Skip to contentSkip to conversation

net/ethernet: ks8851_mll: signedness bug in ks8851_probe()

PATCH Applied Dan Carpenter 3 participants 3 messages Feb 17, 2012 – Feb 19, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ethernet: ks8851_mll: signedness bug in ks8851_probe()

netdev->irq is unsigned, so it's never less than zero.

drivers/net/ethernet/micrel/ks8851_mll.c +1 -1
index 10d5798..b8104d9 100644
@@ -1544,7 +1544,7 @@ static int __devinit ks8851_probe(struct platform_device *pdev)
 
 	netdev->irq = platform_get_irq(pdev, 0);
 
-	if (netdev->irq < 0) {
+	if ((int)netdev->irq < 0) {
 		err = netdev->irq;
 		goto err_get_irq;
 	}
Tested-by on v1 1/1
#1 lore raw

Antwort: [patch] net/ethernet: ks8851_mll: signedness bug in ks8851_probe()

Dan Carpenter <[email protected]> schrieb am 17.02.2012 07:44:33:

Quoted 9 lines

Von: Dan Carpenter <[email protected]>
An: Jan Weitzel <[email protected]>
Kopie: Alexey Dobriyan <[email protected]>, "David S. Miller" <[email protected]>, Paul Gortmaker <[email protected]>, Thomas Meyer <[email protected]>, Danny Kukawka <[email protected]>, [email protected], [email protected]
Datum: 17.02.2012 07:45
Betreff: [patch] net/ethernet: ks8851_mll: signedness bug in

ks8851_probe()

Quoted 4 lines

netdev->irq is unsigned, so it's never less than zero.

Quoted 15 lines
drivers/net/ renamed from drivers/net/ethernet/micrel/ks8851_mll.c +0 -0

ethernet/micrel/ks8851_mll.c
index 10d5798..b8104d9 100644

drivers/net/ethernet/micrel/ks8851_mll.c +1 -1
@@ -1544,7 +1544,7 @@ static int __devinit ks8851_probe(struct 
 platform_device *pdev)
 
    netdev->irq = platform_get_irq(pdev, 0);
 
-   if (netdev->irq < 0) {
+   if ((int)netdev->irq < 0) {
       err = netdev->irq;
       goto err_get_irq;
    }