diff options
author | Rob Clark <robdclark@gmail.com> | 2017-08-24 14:24:29 -0400 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2017-10-12 14:19:08 -0400 |
commit | 6bd6ae2dfc7e091059fd8a650579bb1efc9b4b9f (patch) | |
tree | c95e757facdf8fcbf0a3630b0cf12158b8dacec8 /drivers/gpu | |
parent | 9e4621531e2af230611c28c67306a31e1a09f76a (diff) |
drm/msm: fix error path cleanup
If we fail to attach iommu, gpu->aspace could be IS_ERR()..
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gpu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c index ffbff27600e0..6a887032c66a 100644 --- a/drivers/gpu/drm/msm/msm_gpu.c +++ b/drivers/gpu/drm/msm/msm_gpu.c @@ -718,7 +718,8 @@ void msm_gpu_cleanup(struct msm_gpu *gpu) msm_gem_put_iova(gpu->rb->bo, gpu->aspace); msm_ringbuffer_destroy(gpu->rb); } - if (gpu->aspace) { + + if (!IS_ERR_OR_NULL(gpu->aspace)) { gpu->aspace->mmu->funcs->detach(gpu->aspace->mmu, NULL, 0); msm_gem_address_space_put(gpu->aspace); |