panfrost: Avoid double unlock.

Fix defect reported by Coverity Scan.

Double unlock (LOCK)
double_unlock: pthread_mutex_unlock unlocks dev->indirect_draw_shaders.lock while it is unlocked.

Fixes: 2e6d94c198 ("panfrost: Add helpers to support indirect draws")
Suggested-by: Alyssa Rosenzweig <alyssa@collabora.com>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14262>
This commit is contained in:
Vinson Lee 2021-12-19 20:08:37 -08:00 committed by Marge Bot
parent 1d6f6f9102
commit 9f8a204645

View file

@ -1168,7 +1168,6 @@ create_indirect_draw_shader(struct panfrost_device *dev,
pan_pack(state, RENDERER_STATE, cfg) {
pan_shader_prepare_rsd(&shader_info, address, &cfg);
}
pthread_mutex_unlock(&dev->indirect_draw_shaders.lock);
draw_shader->push = shader_info.push;
draw_shader->rsd = dev->indirect_draw_shaders.states->ptr.gpu +