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

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

Merge "usb: xhci-plat: Prevent NULL access in runtime PM"

parents e0ac0d50 e8ba4837
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -224,6 +224,9 @@ static int xhci_plat_runtime_suspend(struct device *dev)
	struct usb_hcd *hcd = dev_get_drvdata(dev);
	struct xhci_hcd *xhci = hcd_to_xhci(hcd);

	if (!xhci)
		return 0;

	dev_dbg(dev, "xhci-plat runtime suspend\n");

	return xhci_suspend(xhci);
@@ -234,6 +237,9 @@ static int xhci_plat_runtime_resume(struct device *dev)
	struct usb_hcd *hcd = dev_get_drvdata(dev);
	struct xhci_hcd *xhci = hcd_to_xhci(hcd);

	if (!xhci)
		return 0;

	dev_dbg(dev, "xhci-plat runtime resume\n");

	return xhci_resume(xhci, false);