summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorBrian Masney <masneyb@onstation.org>2019-06-26 22:05:15 -0400
committerSean Paul <seanpaul@chromium.org>2019-07-22 13:40:14 -0400
commit7af5cdb158f3398a3220bd2fe81cec8d2be9317c (patch)
tree8220dd1d4290a17e75f4e8278047a3b240d23018 /drivers/gpu
parentcfb7156672dd4de51bcdbc89cfc67c653300f260 (diff)
downloadlinux-7af5cdb158f3398a3220bd2fe81cec8d2be9317c.tar.bz2
drm/msm: correct NULL pointer dereference in context_init
Correct attempted NULL pointer dereference in context_init() when running without an IOMMU. Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Brian Masney <masneyb@onstation.org> Fixes: 295b22ae596c ("drm/msm: Pass the MMU domain index in struct msm_file_private") Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190627020515.5660-1-masneyb@onstation.org
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/msm/msm_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index ab64ab470de7..c226156f2dea 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -619,7 +619,7 @@ static int context_init(struct drm_device *dev, struct drm_file *file)
msm_submitqueue_init(dev, ctx);
- ctx->aspace = priv->gpu->aspace;
+ ctx->aspace = priv->gpu ? priv->gpu->aspace : NULL;
file->driver_priv = ctx;
return 0;