Skip to content

Commit 3efe180

Browse files
drm/qxl: add NULL check for bo->resource
When allocations fails that can be NULL now. Signed-off-by: Christian König <[email protected]> Reported-by: Daniel Bristot de Oliveira <[email protected]> Tested-by: Daniel Bristot de Oliveira <[email protected]> Tested-by: Roberto Sassu <[email protected]> Fixes: bfa3357 ("drm/ttm: allocate resource object instead of embedding it v2") Acked-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent f18f580 commit 3efe180

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/qxl/qxl_ttm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static void qxl_bo_move_notify(struct ttm_buffer_object *bo,
127127
struct qxl_bo *qbo;
128128
struct qxl_device *qdev;
129129

130-
if (!qxl_ttm_bo_is_qxl_bo(bo))
130+
if (!qxl_ttm_bo_is_qxl_bo(bo) || !bo->resource)
131131
return;
132132
qbo = to_qxl_bo(bo);
133133
qdev = to_qxl(qbo->tbo.base.dev);

0 commit comments

Comments
 (0)