summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/etnaviv
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2019-08-19 06:17:33 +0000
committerLucas Stach <l.stach@pengutronix.de>2019-09-02 12:48:55 +0200
commitdbcc574a4bfad810ce6e118f3cf327c7b6e7c897 (patch)
tree0d863bca3f4f1001403e68fa8e7bb44511090299 /drivers/gpu/drm/etnaviv
parent578d2342ec702e5fb8a77983fabb3754ae3e9660 (diff)
drm/etnaviv: fix missing unlock on error in etnaviv_iommuv1_context_alloc()
Add the missing unlock before return from function etnaviv_iommuv1_context_alloc() in the error handling case. Fixes: 27b67278e007 ("drm/etnaviv: rework MMU handling") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/etnaviv')
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_iommu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_iommu.c b/drivers/gpu/drm/etnaviv/etnaviv_iommu.c
index aac8dbf3ea56..1a7c89a67bea 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_iommu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_iommu.c
@@ -140,8 +140,10 @@ etnaviv_iommuv1_context_alloc(struct etnaviv_iommu_global *global)
}
v1_context = kzalloc(sizeof(*v1_context), GFP_KERNEL);
- if (!v1_context)
+ if (!v1_context) {
+ mutex_unlock(&global->lock);
return NULL;
+ }
v1_context->pgtable_cpu = dma_alloc_wc(global->dev, PT_SIZE,
&v1_context->pgtable_dma,