ARM: amba: make use of -1 IRQs warn
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 18 Dec 2011 11:43:56 +0000 (11:43 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 25 Jan 2012 11:04:02 +0000 (11:04 +0000)
Make the core warn about the use of -1 (NO_IRQ)

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/amba/bus.c

index d15acbb4d59e5ff7734de34fedabb1759e5a4b5b..01c2cf4efcdde81ba9ec012ec67a1660524c8b86 100644 (file)
@@ -511,6 +511,9 @@ int amba_device_add(struct amba_device *dev, struct resource *parent)
        void __iomem *tmp;
        int i, ret;
 
+       WARN_ON(dev->irq[0] == (unsigned int)-1);
+       WARN_ON(dev->irq[1] == (unsigned int)-1);
+
        ret = request_resource(parent, &dev->res);
        if (ret)
                goto err_out;