Commit 3efe180d authored by Christian König's avatar Christian König

drm/qxl: add NULL check for bo->resource

When allocations fails that can be NULL now.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reported-by: default avatarDaniel Bristot de Oliveira <bristot@kernel.org>
Tested-by: default avatarDaniel Bristot de Oliveira <bristot@kernel.org>
Tested-by: default avatarRoberto Sassu <roberto.sassu@huawei.com>
Fixes: bfa3357e ("drm/ttm: allocate resource object instead of embedding it v2")
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210708114710.8186-1-christian.koenig@amd.com
parent f18f5801
...@@ -127,7 +127,7 @@ static void qxl_bo_move_notify(struct ttm_buffer_object *bo, ...@@ -127,7 +127,7 @@ static void qxl_bo_move_notify(struct ttm_buffer_object *bo,
struct qxl_bo *qbo; struct qxl_bo *qbo;
struct qxl_device *qdev; struct qxl_device *qdev;
if (!qxl_ttm_bo_is_qxl_bo(bo)) if (!qxl_ttm_bo_is_qxl_bo(bo) || !bo->resource)
return; return;
qbo = to_qxl_bo(bo); qbo = to_qxl_bo(bo);
qdev = to_qxl(qbo->tbo.base.dev); qdev = to_qxl(qbo->tbo.base.dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment