projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
drm/ttm: Fix a NULL pointer dereference
[linux-2.6-microblaze.git]
/
drivers
/
gpu
/
drm
/
ttm
/
ttm_device.c
diff --git
a/drivers/gpu/drm/ttm/ttm_device.c
b/drivers/gpu/drm/ttm/ttm_device.c
index
e7147e3
..
b84f748
100644
(file)
--- a/
drivers/gpu/drm/ttm/ttm_device.c
+++ b/
drivers/gpu/drm/ttm/ttm_device.c
@@
-158,7
+158,7
@@
int ttm_device_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
struct ttm_buffer_object *bo = res->bo;
uint32_t num_pages;
- if (!bo)
+ if (!bo
|| bo->resource != res
)
continue;
num_pages = PFN_UP(bo->base.size);