mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 08:46:46 +00:00
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>
This commit is contained in:
parent
a254810a86
commit
1f21569c0f
1 changed files with 2 additions and 0 deletions
|
@ -2603,6 +2603,7 @@ static int xhci_configure_endpoint(struct xhci_hcd *xhci,
|
||||||
in_ctx = virt_dev->in_ctx;
|
in_ctx = virt_dev->in_ctx;
|
||||||
ctrl_ctx = xhci_get_input_control_ctx(xhci, in_ctx);
|
ctrl_ctx = xhci_get_input_control_ctx(xhci, in_ctx);
|
||||||
if (!ctrl_ctx) {
|
if (!ctrl_ctx) {
|
||||||
|
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||||
xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
|
xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
|
||||||
__func__);
|
__func__);
|
||||||
return -ENOMEM;
|
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;
|
command = vdev->eps[ep_index].stream_info->free_streams_command;
|
||||||
ctrl_ctx = xhci_get_input_control_ctx(xhci, command->in_ctx);
|
ctrl_ctx = xhci_get_input_control_ctx(xhci, command->in_ctx);
|
||||||
if (!ctrl_ctx) {
|
if (!ctrl_ctx) {
|
||||||
|
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||||
xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
|
xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
|
||||||
__func__);
|
__func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Loading…
Reference in a new issue