]> err.no Git - linux-2.6/commitdiff
[ARM] am79c961a: platform_get_irq() may return signed unnoticed
authorRoel Kluin <12o3l@tiscali.nl>
Wed, 23 Apr 2008 21:44:03 +0000 (23:44 +0200)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 28 Apr 2008 20:24:44 +0000 (21:24 +0100)
dev->irq is unsigned, platform_get_irq() may return signed unnoticed

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/net/arm/am79c961a.c

index ba6bd03a015ff6afad60ae65d8c614b35a6671d4..a637910b02dd74766f4c79ebed4385dea8fb18f4 100644 (file)
@@ -693,11 +693,15 @@ static int __init am79c961_probe(struct platform_device *pdev)
         * done by the ether bootp loader.
         */
        dev->base_addr = res->start;
-       dev->irq = platform_get_irq(pdev, 0);
+       ret = platform_get_irq(pdev, 0);
 
-       ret = -ENODEV;
-       if (dev->irq < 0)
+       if (ret < 0) {
+               ret = -ENODEV;
                goto nodev;
+       }
+       dev->irq = ret;
+
+       ret = -ENODEV;
        if (!request_region(dev->base_addr, 0x18, dev->name))
                goto nodev;