summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2011-08-05 22:14:46 +0200
committerFelipe Balbi <balbi@ti.com>2011-08-12 12:03:15 +0300
commitbb8070c29ca87ac0aa24e04a1207cc932f62258f (patch)
tree0fd2184020461f5416851be2ddeca4af4b8b9a02 /drivers/usb/gadget
parentad50c1b20ff27780afbb8bcd3d153393d360419e (diff)
usb: gadget: f_phonet: unlock in error case
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/f_phonet.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/f_phonet.c b/drivers/usb/gadget/f_phonet.c
index 8f8d3f6cd89e..8f3eab1af885 100644
--- a/drivers/usb/gadget/f_phonet.c
+++ b/drivers/usb/gadget/f_phonet.c
@@ -434,6 +434,7 @@ static int pn_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
config_ep_by_speed(gadget, f, fp->out_ep)) {
fp->in_ep->desc = NULL;
fp->out_ep->desc = NULL;
+ spin_unlock(&port->lock);
return -EINVAL;
}
usb_ep_enable(fp->out_ep);