Skip to content

Commit df42153

Browse files
Dan Carpenterdavem330
authored andcommitted
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: Dan Carpenter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 78032f9 commit df42153

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/netdevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,7 @@ struct net_device {
11321132
unsigned long mem_end; /* shared mem end */
11331133
unsigned long mem_start; /* shared mem start */
11341134
unsigned long base_addr; /* device I/O address */
1135-
unsigned int irq; /* device IRQ number */
1135+
int irq; /* device IRQ number */
11361136

11371137
/*
11381138
* Some hardware also needs these fields, but they are not

0 commit comments

Comments
 (0)