Hi Dan, On 02/04/16 05:51, Dan Carpenter wrote: > We added some new locking here, but missed an error path where we need > to unlock. > > Fixes: 9acdf4df2fc4 ('usb: gadget: f_midi: added spinlock on transmit function') > Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Acked-by: Felipe F. Tonello <eu@xxxxxxxxxxxxxxxxx> > > diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c > index 56e2dde..2c0616c 100644 > --- a/drivers/usb/gadget/function/f_midi.c > +++ b/drivers/usb/gadget/function/f_midi.c > @@ -609,8 +609,10 @@ static void f_midi_transmit(struct f_midi *midi) > > do { > ret = f_midi_do_transmit(midi, ep); > - if (ret < 0) > + if (ret < 0) { > + spin_unlock_irqrestore(&midi->transmit_lock, flags); > goto drop_out; > + } > } while (ret); > > spin_unlock_irqrestore(&midi->transmit_lock, flags); > -- Felipe
Attachment:
0x92698E6A.asc
Description: application/pgp-keys