From: Wei Yongjun <weiyongj...@huawei.com>

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

Signed-off-by: Wei Yongjun <weiyongj...@huawei.com>
---
 drivers/usb/host/xhci-tegra.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c
index d39b37b..a59fafb 100644
--- a/drivers/usb/host/xhci-tegra.c
+++ b/drivers/usb/host/xhci-tegra.c
@@ -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;
        }

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to