aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2010-12-10 13:03:29 -0500
committerFelipe Balbi <balbi@ti.com>2011-02-01 03:41:29 -0500
commit541079de88735152a993ff93e90096643730a054 (patch)
treef01ade724912a671831f710f1d2945808b195269 /drivers/usb
parent456bb1697ec08c034449c81e03094fe26bedb9e9 (diff)
usb: musb: core: fix IRQ check
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/musb/musb_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 12b515b3b69e..54a8bd1047d6 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2185,7 +2185,7 @@ static int __init musb_probe(struct platform_device *pdev)
2185 void __iomem *base; 2185 void __iomem *base;
2186 2186
2187 iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 2187 iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
2188 if (!iomem || irq == 0) 2188 if (!iomem || irq <= 0)
2189 return -ENODEV; 2189 return -ENODEV;
2190 2190
2191 base = ioremap(iomem->start, resource_size(iomem)); 2191 base = ioremap(iomem->start, resource_size(iomem));