]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
sh_eth: unsigned ndev->irq cannot be negative
authorroel kluin <roel.kluin@gmail.com>
Wed, 10 Sep 2008 17:22:44 +0000 (19:22 +0200)
committerPaul Mundt <lethal@linux-sh.org>
Thu, 11 Sep 2008 05:56:57 +0000 (14:56 +0900)
unsigned ndev->irq cannot be negative

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/net/sh_eth.c

index 1c370e6aa641d571467c4b4727e009bd8a01fd1c..1a04814291c164c02d9802f714acf5cfce6e20fd 100644 (file)
@@ -1205,11 +1205,12 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
                devno = 0;
 
        ndev->dma = -1;
-       ndev->irq = platform_get_irq(pdev, 0);
-       if (ndev->irq < 0) {
+       ret = platform_get_irq(pdev, 0);
+       if (ret < 0) {
                ret = -ENODEV;
                goto out_release;
        }
+       ndev->irq = ret;
 
        SET_NETDEV_DEV(ndev, &pdev->dev);