From: Dan Carpenter Date: Thu, 7 Nov 2013 07:48:49 +0000 (+0300) Subject: net: make ndev->irq signed for error handling X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=df42153c59a38a65c6f7440d5c70d87d1c24438d;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Signed-off-by: David S. Miller --- diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index e6353cafbf05..b6f6efbcfc74 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -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