diff options
author | Rob Clark <robdclark@gmail.com> | 2017-01-13 01:41:44 +0300 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2017-01-13 18:23:00 +0300 |
commit | de85d2b35ac74f6be769573d4a8708c823219900 (patch) | |
tree | 5b32e7cb9254da81a1babad707e8ef76d56f4d43 /drivers/gpu/drm/msm/msm_gem.c | |
parent | c57a94ffd0105d58ab104fe383148c5eda5aa033 (diff) | |
download | linux-de85d2b35ac74f6be769573d4a8708c823219900.tar.xz |
drm/msm: fix potential null ptr issue in non-iommu case
Fixes: 9cb07b099fb ("drm/msm: support multiple address spaces")
Reported-by: Riku Voipio <riku.voipio@linaro.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gem.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gem.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index d8bc59c7e261..8098677a3916 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c @@ -294,6 +294,8 @@ put_iova(struct drm_gem_object *obj) WARN_ON(!mutex_is_locked(&dev->struct_mutex)); for (id = 0; id < ARRAY_SIZE(msm_obj->domain); id++) { + if (!priv->aspace[id]) + continue; msm_gem_unmap_vma(priv->aspace[id], &msm_obj->domain[id], msm_obj->sgt); } |