usb: gadget: uvc: fix missing mutex_unlock() if kstrtou8() fails
authorYang Yingliang <yangyingliang@huawei.com>
Mon, 13 Feb 2023 07:09:26 +0000 (15:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Feb 2023 13:41:24 +0000 (14:41 +0100)
commit7ebb605d2283fb2647b4fa82030307ce00bee436
tree827c0688c5706ab45506d49edbbd7bc08e989262
parent77191db5ba7bd321fbbf4315675ee774a2b5a362
usb: gadget: uvc: fix missing mutex_unlock() if kstrtou8() fails

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