Skip to contentSkip to conversation

usb: host: xhci-tegra: Fix error return code in tegra_xusb_probe()

PATCH New Wei Yongjun 1 participant 1 message Sep 10, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: host: xhci-tegra: Fix error return code in tegra_xusb_probe()

From: Wei Yongjun <[email protected]>

Fix to return error code -ENOMEM from the usb_create_shared_hcd() error handling case instead of 0, as done elsewhere in this function.

---
 drivers/usb/host/xhci-tegra.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/host/xhci-tegra.c +1 -0
index d39b37b..a59fafb 100644
@@ -1116,6 +1116,7 @@ static int tegra_xusb_probe(struct platform_device *pdev)
 						 tegra->hcd);
 	if (!xhci->shared_hcd) {
 		dev_err(&pdev->dev, "failed to create shared HCD\n");
+		err = -ENOMEM;
 		goto remove_usb2;
 	}