Skip to content

Commit

Permalink
usb: musb: core: fix IRQ check
Browse files Browse the repository at this point in the history
musb_probe() only regards 0 as a wrong IRQ number, despite platform_get_irq()
that it calls returns -ENXIO in that case. It leads to musb_init_controller()
calling request_irq() with a negative IRQ number, and when it naturally
fails, the following is printed to the console:

request_irq -6 failed!
musb_init_controller failed with status -19

Fix musb_probe() to filter out the error values as well as 0.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Sergei Shtylyov authored and Felipe Balbi committed Feb 1, 2011
1 parent 456bb16 commit 541079d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/musb/musb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2185,7 +2185,7 @@ static int __init musb_probe(struct platform_device *pdev)
void __iomem *base;

iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!iomem || irq == 0)
if (!iomem || irq <= 0)
return -ENODEV;

base = ioremap(iomem->start, resource_size(iomem));
Expand Down

0 comments on commit 541079d

Please sign in to comment.