Skip to content

Commit

Permalink
net: make ndev->irq signed for error handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Nov 8, 2013
1 parent 78032f9 commit df42153
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit df42153

Please sign in to comment.