Commit d9f674f1 authored by Yang Yingliang's avatar Yang Yingliang Committed by sanglipeng
Browse files

usb: gadget: uvc: fix missing mutex_unlock() if kstrtou8() fails

stable inclusion
from stable-v5.10.173
commit 8ecd5dabddc0b70d82ca45e8c664e31fd04eaa92
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7X0QU

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8ecd5dabddc0b70d82ca45e8c664e31fd04eaa92



--------------------------------

commit 7ebb605d upstream.

If kstrtou8() fails, the mutex_unlock() is missed, move kstrtou8()
before mutex_lock() to fix it up.

Fixes: 0525210c ("usb: gadget: uvc: Allow definition of XUs in configfs")
Fixes: b3c839bd ("usb: gadget: uvc: Make bSourceID read/write")
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20230213070926.776447-1-yangyingliang@huawei.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent fb177c0c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment