aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2022-08-18 08:51:04 +1000
committerDave Airlie <airlied@redhat.com>2022-08-18 08:51:42 +1000
commit2ae6ab9d82cdd0f7381639ee31e31de45519df4c (patch)
treefa1552d8ab243c083dd0e6b663714d188f0459af /drivers/gpu/drm/ttm
parentMerge tag 'drm-intel-next-fixes-2022-08-11' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes (diff)
parentdrm/sun4i: dsi: Prevent underflow when computing packet sizes (diff)
downloadlinux-dev-2ae6ab9d82cdd0f7381639ee31e31de45519df4c.tar.xz
linux-dev-2ae6ab9d82cdd0f7381639ee31e31de45519df4c.zip
Merge tag 'drm-misc-fixes-2022-08-16' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
One patch for imx/dcss to get rid of a warning message, one off-by-one fix and GA103 support for nouveau, a refcounting fix for meson, a NULL pointer dereference fix for ttm, a error check fix for lvds-codec, a dt-binding schema fix and an underflow fix for sun4i Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20220816094401.wtadc7ddr6lzq6aj@houat
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 0e210df65c30..97184c333526 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -912,7 +912,7 @@ int ttm_bo_validate(struct ttm_buffer_object *bo,
/*
* We might need to add a TTM.
*/
- if (bo->resource->mem_type == TTM_PL_SYSTEM) {
+ if (!bo->resource || bo->resource->mem_type == TTM_PL_SYSTEM) {
ret = ttm_tt_create(bo, true);
if (ret)
return ret;