diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2023-07-28 16:51:20 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-07-30 13:25:31 +0200 |
commit | 6bb75eb9ff3acfc3e1f31c01d70e72b3b3637167 (patch) | |
tree | 652349449608df99273e16363875c019293a1163 /drivers | |
parent | ba0b3af706305e5b11fd832eecd2c4a7fce57156 (diff) | |
download | linux-stable-6bb75eb9ff3acfc3e1f31c01d70e72b3b3637167.tar.gz linux-stable-6bb75eb9ff3acfc3e1f31c01d70e72b3b3637167.tar.bz2 linux-stable-6bb75eb9ff3acfc3e1f31c01d70e72b3b3637167.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/function/f_midi2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/f_midi2.c b/drivers/usb/gadget/function/f_midi2.c index f1c47753e0c1..5a971ba600fe 100644 --- a/drivers/usb/gadget/function/f_midi2.c +++ b/drivers/usb/gadget/function/f_midi2.c @@ -2350,8 +2350,8 @@ static int f_midi2_block_opts_create(struct f_midi2_ep_opts *ep_opts, ep_opts->blks[blk] = block_opts; *block_p = block_opts; - mutex_unlock(&ep_opts->opts->lock); out: + mutex_unlock(&ep_opts->opts->lock); return ret; } |