]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
usb: musb: core: fix IRQ check
authorSergei Shtylyov <sshtylyov@ru.mvista.com>
Fri, 10 Dec 2010 18:03:29 +0000 (21:03 +0300)
committerFelipe Balbi <balbi@ti.com>
Tue, 1 Feb 2011 08:41:29 +0000 (10:41 +0200)
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>
drivers/usb/musb/musb_core.c

index 12b515b3b69ef25ef8d18117f4201e5758a6e2cf..54a8bd1047d611a1c4b533ef3008c4d5fe7e602b 100644 (file)
@@ -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));