Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6bd6ae2d authored by Rob Clark's avatar Rob Clark
Browse files

drm/msm: fix error path cleanup



If we fail to attach iommu, gpu->aspace could be IS_ERR()..

Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent 9e462153
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -718,7 +718,8 @@ void msm_gpu_cleanup(struct msm_gpu *gpu)
			msm_gem_put_iova(gpu->rb->bo, gpu->aspace);
			msm_gem_put_iova(gpu->rb->bo, gpu->aspace);
		msm_ringbuffer_destroy(gpu->rb);
		msm_ringbuffer_destroy(gpu->rb);
	}
	}
	if (gpu->aspace) {

	if (!IS_ERR_OR_NULL(gpu->aspace)) {
		gpu->aspace->mmu->funcs->detach(gpu->aspace->mmu,
		gpu->aspace->mmu->funcs->detach(gpu->aspace->mmu,
			NULL, 0);
			NULL, 0);
		msm_gem_address_space_put(gpu->aspace);
		msm_gem_address_space_put(gpu->aspace);