Commit df42153c authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

net: make ndev->irq signed for error handling

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 78032f9b
...@@ -1132,7 +1132,7 @@ struct net_device { ...@@ -1132,7 +1132,7 @@ struct net_device {
unsigned long mem_end; /* shared mem end */ unsigned long mem_end; /* shared mem end */
unsigned long mem_start; /* shared mem start */ unsigned long mem_start; /* shared mem start */
unsigned long base_addr; /* device I/O address */ 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 * Some hardware also needs these fields, but they are not
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment