Skip to content

Commit 32d174d

Browse files
Tang Bingregkh
authored andcommitted
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: 79ad3b5 ("usb: host: Add EHCI driver for NVIDIA Tegra SoCs") Acked-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20201026090657.49988-1-tangbin@cmss.chinamobile.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b9c6f78 commit 32d174d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/usb/host/ehci-tegra.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,8 @@ static int tegra_ehci_probe(struct platform_device *pdev)
479479
u_phy->otg->host = hcd_to_bus(hcd);
480480

481481
irq = platform_get_irq(pdev, 0);
482-
if (!irq) {
483-
err = -ENODEV;
482+
if (irq < 0) {
483+
err = irq;
484484
goto cleanup_phy;
485485
}
486486

0 commit comments

Comments
 (0)