Skip to contentSkip to conversation

xhci: Add missing unlocks on error paths

PATCH New Emil Goode 1 participant 1 message Jun 19, 2013

Subsystems (3)
lore
Share & tools
lore

Emil Goode

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/usb/host/xhci.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/usb/host/xhci.c +2 -0
index 6779c92..2c49f00 100644
@@ -2603,6 +2603,7 @@ static int xhci_configure_endpoint(struct xhci_hcd *xhci,
 		in_ctx = virt_dev->in_ctx;
 	ctrl_ctx = xhci_get_input_control_ctx(xhci, in_ctx);
 	if (!ctrl_ctx) {
+		spin_unlock_irqrestore(&xhci->lock, flags);
 		xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
 				__func__);
 		return -ENOMEM;
@@ -3298,6 +3299,7 @@ int xhci_free_streams(struct usb_hcd *hcd, struct usb_device *udev,
 	command = vdev->eps[ep_index].stream_info->free_streams_command;
 	ctrl_ctx = xhci_get_input_control_ctx(xhci, command->in_ctx);
 	if (!ctrl_ctx) {
+		spin_unlock_irqrestore(&xhci->lock, flags);
 		xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
 				__func__);
 		return -EINVAL;
Signature · 1 line
1.7.10.4