mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 14:12:07 +02:00
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: 29ee7a4ddd ("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>
This commit is contained in:
parent
ba0b3af706
commit
6bb75eb9ff
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user