Commit dbcc574a authored by Wei Yongjun's avatar Wei Yongjun Committed by Lucas Stach

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: 27b67278 ("drm/etnaviv: rework MMU handling")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
parent 578d2342
...@@ -140,8 +140,10 @@ etnaviv_iommuv1_context_alloc(struct etnaviv_iommu_global *global) ...@@ -140,8 +140,10 @@ etnaviv_iommuv1_context_alloc(struct etnaviv_iommu_global *global)
} }
v1_context = kzalloc(sizeof(*v1_context), GFP_KERNEL); v1_context = kzalloc(sizeof(*v1_context), GFP_KERNEL);
if (!v1_context) if (!v1_context) {
mutex_unlock(&global->lock);
return NULL; return NULL;
}
v1_context->pgtable_cpu = dma_alloc_wc(global->dev, PT_SIZE, v1_context->pgtable_cpu = dma_alloc_wc(global->dev, PT_SIZE,
&v1_context->pgtable_dma, &v1_context->pgtable_dma,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment