Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07c9a937 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "xhci-hub: Handle error condition with xhci_stop_device" into msm-4.9

parents 23db8d13 f7e7f483
Loading
Loading
Loading
Loading
+14 −3
Original line number Diff line number Diff line
@@ -407,11 +407,20 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend)
				return -ENOMEM;

			}
			xhci_queue_stop_endpoint(xhci, command, slot_id, i,
						 suspend);

			ret = xhci_queue_stop_endpoint(xhci, command, slot_id,
					i, suspend);
			if (ret) {
				spin_unlock_irqrestore(&xhci->lock, flags);
				goto err_cmd_queue;
			}
		}
	}
	xhci_queue_stop_endpoint(xhci, cmd, slot_id, 0, suspend);
	ret = xhci_queue_stop_endpoint(xhci, cmd, slot_id, 0, suspend);
	if (ret) {
		spin_unlock_irqrestore(&xhci->lock, flags);
		goto err_cmd_queue;
	}
	xhci_ring_cmd_db(xhci);
	spin_unlock_irqrestore(&xhci->lock, flags);

@@ -422,6 +431,8 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend)
		xhci_warn(xhci, "Timeout while waiting for stop endpoint command\n");
		ret = -ETIME;
	}

err_cmd_queue:
	xhci_free_command(xhci, cmd);
	return ret;
}