diff options
author | David Mosberger-Tang <davidm@egauge.net> | 2014-05-28 18:09:16 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-28 19:57:34 -0400 |
commit | 00c5aa178a5ba217a4143f8a5f70630550a87600 (patch) | |
tree | 48baeee19f711b8ed65883efad5f27d2ae46f16b /drivers/usb/host/max3421-hcd.c | |
parent | ff1fcd50bc2459744e6f948310bc18eb7d6e8c72 (diff) |
usb: host: max3421-hcd: Fix missing unlock in max3421_urb_enqueue()
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David Mosberger <davidm@egauge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/max3421-hcd.c')
-rw-r--r-- | drivers/usb/host/max3421-hcd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/host/max3421-hcd.c b/drivers/usb/host/max3421-hcd.c index 28abda14c5e2..714f99faa14a 100644 --- a/drivers/usb/host/max3421-hcd.c +++ b/drivers/usb/host/max3421-hcd.c | |||
@@ -1545,8 +1545,10 @@ max3421_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) | |||
1545 | if (!max3421_ep) { | 1545 | if (!max3421_ep) { |
1546 | /* gets freed in max3421_endpoint_disable: */ | 1546 | /* gets freed in max3421_endpoint_disable: */ |
1547 | max3421_ep = kzalloc(sizeof(struct max3421_ep), mem_flags); | 1547 | max3421_ep = kzalloc(sizeof(struct max3421_ep), mem_flags); |
1548 | if (!max3421_ep) | 1548 | if (!max3421_ep) { |
1549 | return -ENOMEM; | 1549 | retval = -ENOMEM; |
1550 | goto out; | ||
1551 | } | ||
1550 | max3421_ep->ep = urb->ep; | 1552 | max3421_ep->ep = urb->ep; |
1551 | max3421_ep->last_active = max3421_hcd->frame_number; | 1553 | max3421_ep->last_active = max3421_hcd->frame_number; |
1552 | urb->ep->hcpriv = max3421_ep; | 1554 | urb->ep->hcpriv = max3421_ep; |
@@ -1561,6 +1563,7 @@ max3421_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) | |||
1561 | wake_up_process(max3421_hcd->spi_thread); | 1563 | wake_up_process(max3421_hcd->spi_thread); |
1562 | } | 1564 | } |
1563 | 1565 | ||
1566 | out: | ||
1564 | spin_unlock_irqrestore(&max3421_hcd->lock, flags); | 1567 | spin_unlock_irqrestore(&max3421_hcd->lock, flags); |
1565 | return retval; | 1568 | return retval; |
1566 | } | 1569 | } |