Skip to content

Commit c856b4b

Browse files
Tang Bingregkh
authored andcommitted
USB: EHCI: ehci-mv: fix error handling in mv_ehci_probe()
If the function platform_get_irq() failed, the negative value returned will not be detected here. So fix error handling in mv_ehci_probe(). And when get irq failed, the function platform_get_irq() logs an error message, so remove redundant message here. Signed-off-by: Zhang Shengju <[email protected]> Signed-off-by: Tang Bin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 09806eb commit c856b4b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/usb/host/ehci-mv.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,8 @@ static int mv_ehci_probe(struct platform_device *pdev)
167167
hcd->regs = ehci_mv->op_regs;
168168

169169
hcd->irq = platform_get_irq(pdev, 0);
170-
if (!hcd->irq) {
171-
dev_err(&pdev->dev, "Cannot get irq.");
172-
retval = -ENODEV;
170+
if (hcd->irq < 0) {
171+
retval = hcd->irq;
173172
goto err_disable_clk;
174173
}
175174

0 commit comments

Comments
 (0)