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>
}
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,