drm/msm: unlock on error in get_sched_entity()
Add a missing unlock on the error path if drm_sched_entity_init() fails.
Fixes: 68002469e5
("drm/msm: One sched entity per process per priority")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20211011124005.GE15188@kili
Signed-off-by: Rob Clark <robdclark@chromium.org>
This commit is contained in:
Родитель
f8e7bce3a6
Коммит
7425e81675
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче