usb: gadget: f_midi: unlock on error
We added some new locking here, but missed an error path where we need
to unlock.
Fixes: 9acdf4df2f
('usb: gadget: f_midi: added spinlock on transmit function')
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Acked-by: Felipe F. Tonello <eu@felipetonello.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
parent
6490865c67
commit
4fc50ba596
|
@ -611,8 +611,10 @@ static void f_midi_transmit(struct f_midi *midi)
|
||||||
|
|
||||||
do {
|
do {
|
||||||
ret = f_midi_do_transmit(midi, ep);
|
ret = f_midi_do_transmit(midi, ep);
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
spin_unlock_irqrestore(&midi->transmit_lock, flags);
|
||||||
goto drop_out;
|
goto drop_out;
|
||||||
|
}
|
||||||
} while (ret);
|
} while (ret);
|
||||||
|
|
||||||
spin_unlock_irqrestore(&midi->transmit_lock, flags);
|
spin_unlock_irqrestore(&midi->transmit_lock, flags);
|
||||||
|
|
Loading…
Reference in New Issue