On Fri, 28 Jul 2023 10:51:20 +0200, Yang Yingliang wrote: > > 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@xxxxxxxxxx> Thanks, Good catch! Reviewed-by: Takashi Iwai <tiwai@xxxxxxx> Takashi > --- > drivers/usb/gadget/function/f_midi2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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; > } > > -- > 2.25.1 >