usb: gadget: uvc: fix missing mutex_unlock() if kstrtou8() fails
commitcc4b55a48f4aabbac8d84cfa7e5ed17b2b061bc7
authorYang Yingliang <yangyingliang@huawei.com>
Mon, 13 Feb 2023 07:09:26 +0000 (13 15:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 12:55:44 +0000 (11 13:55 +0100)
tree93a1c3c0f7546a4591696b734e5d1803b565adce
parent58b656177d17b753e4959eba8a2600f687119a26
usb: gadget: uvc: fix missing mutex_unlock() if kstrtou8() fails

commit 7ebb605d2283fb2647b4fa82030307ce00bee436 upstream.

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

Fixes: 0525210c9840 ("usb: gadget: uvc: Allow definition of XUs in configfs")
Fixes: b3c839bd8a07 ("usb: gadget: uvc: Make bSourceID read/write")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20230213070926.776447-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/uvc_configfs.c