Commit 32d174d2 authored by Tang Bin's avatar Tang Bin Committed by Greg Kroah-Hartman

usb: host: ehci-tegra: Fix error handling in tegra_ehci_probe()

If the function platform_get_irq() failed, the negative value
returned will not be detected here. So fix error handling in
tegra_ehci_probe().

Fixes: 79ad3b5a ("usb: host: Add EHCI driver for NVIDIA Tegra SoCs")
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Acked-by: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarTang Bin <tangbin@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20201026090657.49988-1-tangbin@cmss.chinamobile.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b9c6f782
...@@ -479,8 +479,8 @@ static int tegra_ehci_probe(struct platform_device *pdev) ...@@ -479,8 +479,8 @@ static int tegra_ehci_probe(struct platform_device *pdev)
u_phy->otg->host = hcd_to_bus(hcd); u_phy->otg->host = hcd_to_bus(hcd);
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (!irq) { if (irq < 0) {
err = -ENODEV; err = irq;
goto cleanup_phy; goto cleanup_phy;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment