提交 32d174d2 编写于 作者: T Tang Bin 提交者: 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: NAlan Stern <stern@rowland.harvard.edu>
Acked-by: NThierry Reding <treding@nvidia.com>
Signed-off-by: NTang Bin <tangbin@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20201026090657.49988-1-tangbin@cmss.chinamobile.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册