net: make ndev->irq signed for error handling
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 7 Nov 2013 07:48:49 +0000 (10:48 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Nov 2013 00:11:13 +0000 (19:11 -0500)
There is a bug in cpsw_probe() where we do:

ndev->irq = platform_get_irq(pdev, 0);
if (ndev->irq < 0) {

The problem is that "ndev->irq" is unsigned so the error handling
doesn't work.  I have changed it to a regular int.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h

index e6353cafbf0536212b01241fbca023579643d3af..b6f6efbcfc744f8fc3524f35a3c1b24979676c18 100644 (file)
@@ -1132,7 +1132,7 @@ struct net_device {
        unsigned long           mem_end;        /* shared mem end       */
        unsigned long           mem_start;      /* shared mem start     */
        unsigned long           base_addr;      /* device I/O address   */
-       unsigned int            irq;            /* device IRQ number    */
+       int                     irq;            /* device IRQ number    */
 
        /*
         *      Some hardware also needs these fields, but they are not