usb: gadget: midi2: fix missing unlock in f_midi2_block_opts_create()
authorYang Yingliang <yangyingliang@huawei.com>
Fri, 28 Jul 2023 08:51:20 +0000 (16:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 30 Jul 2023 11:25:31 +0000 (13:25 +0200)
commit6bb75eb9ff3acfc3e1f31c01d70e72b3b3637167
tree652349449608df99273e16363875c019293a1163
parentba0b3af706305e5b11fd832eecd2c4a7fce57156
usb: gadget: midi2: fix missing unlock in f_midi2_block_opts_create()

In the error path in f_midi2_block_opts_create(), mutex_unlock() is missed,
fix it by move the unlock after 'out' label.

Fixes: 29ee7a4dddd5 ("usb: gadget: midi2: Add configfs support")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20230728085120.3192474-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_midi2.c