Skip to content

Commit

Permalink
drm/etnaviv: fix missing unlock on error in etnaviv_gpu_submit()
Browse files Browse the repository at this point in the history
Add the missing unlock before return from function etnaviv_gpu_submit()
in the error handling case.

lst: fixed label name.

Fixes: f3cd1b0 ("drm/etnaviv: (re-)protect fence allocation with
GPU mutex")
CC: [email protected] #4.9+
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Lucas Stach <[email protected]>
  • Loading branch information
Wei Yongjun authored and lynxeye-dev committed Apr 12, 2017
1 parent 130e35e commit 45abdf3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/etnaviv/etnaviv_gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 45abdf3

Please sign in to comment.