Commit 7425e816 authored by Dan Carpenter's avatar Dan Carpenter Committed by Rob Clark

drm/msm: unlock on error in get_sched_entity()

Add a missing unlock on the error path if drm_sched_entity_init() fails.

Fixes: 68002469 ("drm/msm: One sched entity per process per priority")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20211011124005.GE15188@kiliSigned-off-by: default avatarRob Clark <robdclark@chromium.org>
parent f8e7bce3
......@@ -101,6 +101,7 @@ get_sched_entity(struct msm_file_private *ctx, struct msm_ringbuffer *ring,
ret = drm_sched_entity_init(entity, sched_prio, &sched, 1, NULL);
if (ret) {
mutex_unlock(&entity_lock);
kfree(entity);
return ERR_PTR(ret);
}
......
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