diff --git a/drivers/gpu/drm/etnaviv/etnaviv_iommu.c b/drivers/gpu/drm/etnaviv/etnaviv_iommu.c index aac8dbf3ea563b9261d977f554508bdc8cccf8fa..1a7c89a67bea3c4e2464c8017d7f4d69474d78b1 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,