diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2010-12-10 21:03:29 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-02-01 10:41:29 +0200 |
commit | 541079de88735152a993ff93e90096643730a054 (patch) | |
tree | f01ade724912a671831f710f1d2945808b195269 /drivers/usb/musb | |
parent | 456bb1697ec08c034449c81e03094fe26bedb9e9 (diff) | |
download | op-kernel-dev-541079de88735152a993ff93e90096643730a054.zip op-kernel-dev-541079de88735152a993ff93e90096643730a054.tar.gz |
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/musb')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 12b515b..54a8bd1 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) 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)); |