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

Commit 45abdf35 authored by Wei Yongjun's avatar Wei Yongjun Committed by Lucas Stach
Browse files

drm/etnaviv: fix missing unlock on error in etnaviv_gpu_submit()



Add the missing unlock before return from function etnaviv_gpu_submit()
in the error handling case.

lst: fixed label name.

Fixes: f3cd1b06 ("drm/etnaviv: (re-)protect fence allocation with
GPU mutex")
CC: stable@vger.kernel.org #4.9+
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
parent 130e35e4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1317,7 +1317,7 @@ int etnaviv_gpu_submit(struct etnaviv_gpu *gpu,
	if (!fence) {
		event_free(gpu, event);
		ret = -ENOMEM;
		goto out_pm_put;
		goto out_unlock;
	}

	gpu->event[event].fence = fence;
@@ -1357,6 +1357,7 @@ int etnaviv_gpu_submit(struct etnaviv_gpu *gpu,
	hangcheck_timer_reset(gpu);
	ret = 0;

out_unlock:
	mutex_unlock(&gpu->lock);

out_pm_put: