]> git.baikalelectronics.ru Git - kernel.git/commit
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>
Sat, 11 Mar 2023 12:55:44 +0000 (13:55 +0100)
commitf24b31fbe1188c0345f40a23dd78d18e1899656a
tree93a1c3c0f7546a4591696b734e5d1803b565adce
parentc59467cc4f93738777cbf06fd909cd41ee9d9c5d
usb: gadget: uvc: fix missing mutex_unlock() if kstrtou8() fails

commit 95ae9b142c1e7966ff5c775630a4f4704b37cf26 upstream.

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

Fixes: c79a82bd06fe ("usb: gadget: uvc: Allow definition of XUs in configfs")
Fixes: dd4658813341 ("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