aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Goode <emilgoode@gmail.com>2013-06-25 18:49:36 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-25 19:41:06 -0400
commit1f21569c0ffc83034c1ea023d16c6114a429c131 (patch)
tree3d734208d2f8b03b42e5dd8ae32a8bf789eb5fdf
parenta254810a86aaaac4ac6ba44fa934558b042a17a7 (diff)
xhci: Add missing unlocks on error paths
This patch adds missing unlocks on error paths in the xhci_free_streams and xhci_configure_endpoint functions. Signed-off-by: Emil Goode <emilgoode@gmail.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/host/xhci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 6779c926e3b0..2c49f00260ca 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -2603,6 +2603,7 @@ static int xhci_configure_endpoint(struct xhci_hcd *xhci,
2603 in_ctx = virt_dev->in_ctx; 2603 in_ctx = virt_dev->in_ctx;
2604 ctrl_ctx = xhci_get_input_control_ctx(xhci, in_ctx); 2604 ctrl_ctx = xhci_get_input_control_ctx(xhci, in_ctx);
2605 if (!ctrl_ctx) { 2605 if (!ctrl_ctx) {
2606 spin_unlock_irqrestore(&xhci->lock, flags);
2606 xhci_warn(xhci, "%s: Could not get input context, bad type.\n", 2607 xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
2607 __func__); 2608 __func__);
2608 return -ENOMEM; 2609 return -ENOMEM;
@@ -3298,6 +3299,7 @@ int xhci_free_streams(struct usb_hcd *hcd, struct usb_device *udev,
3298 command = vdev->eps[ep_index].stream_info->free_streams_command; 3299 command = vdev->eps[ep_index].stream_info->free_streams_command;
3299 ctrl_ctx = xhci_get_input_control_ctx(xhci, command->in_ctx); 3300 ctrl_ctx = xhci_get_input_control_ctx(xhci, command->in_ctx);
3300 if (!ctrl_ctx) { 3301 if (!ctrl_ctx) {
3302 spin_unlock_irqrestore(&xhci->lock, flags);
3301 xhci_warn(xhci, "%s: Could not get input context, bad type.\n", 3303 xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
3302 __func__); 3304 __func__);
3303 return -EINVAL; 3305 return -EINVAL;