ARM: am79c961a: platform_get_irq() may return signed unnoticed
PATCH 1/1 ARM: am79c961a: platform_get_irq() may return signed unnoticed
dev->irq is unsigned, platform_get_irq() may return signed unnoticed
---
drivers/net/arm/am79c961a.c +7 -3
@@ -693,11 +693,15 @@ static int __init am79c961_probe(struct platform_device *pdev)* done by the ether bootp loader. */ dev->base_addr = res->start; - dev->irq =platform_get_irq (pdev,0 ); + ret =platform_get_irq (pdev,0 ); - ret = -ENODEV ; -if (dev->irq <0 ) +if (ret <0 ) { + ret = -ENODEV ; goto nodev; + } + dev->irq = ret; + + ret = -ENODEV ;if (!request_region (dev->base_addr,0x18 , dev->name)) goto nodev;
PATCH 2/2 ARM: ax88796: platform_get_irq() may return signed unnoticed
similarly,
---dev->irq is unsigned, platform_get_irq() may return signed unnoticed
---
drivers/net/ax88796.c +3 -3
@@ -838,10 +838,10 @@ static int ax_probe(struct platform_device *pdev)/* find the platform resources */ - dev->irq =platform_get_irq (pdev,0 ); -if (dev->irq <0 ) { + ret =platform_get_irq (pdev,0 ); + dev->irq = ret; +if (ret <0 ) {dev_err (&pdev->dev,"no IRQ specified\n" ); - ret = -ENXIO ; goto exit_mem; }
Re: [PATCH 2/2] ARM: ax88796: platform_get_irq() may return signed unnoticed
Quoted 1 line · Roel Kluin
similarly,
At the top of the file, it says:
* Copyright 2005,2007 Simtec Electronics
* Ben Dooks <[email protected]>
So adding Ben.
Quoted 29 lines
---
dev->irqis unsigned,platform_get_irq()may return signed unnoticedSigned-off-by Roel Kluin <[email protected]>---
drivers/net/ax88796.c +3
-4@@ -838,10 +838,10 @@ static int ax_probe(struct platform_device *pdev)/* find the platform resources */ - dev->irq =platform_get_irq (pdev,0 ); -if (dev->irq <0 ) { + ret =platform_get_irq (pdev,0 ); + dev->irq = ret; +if (ret <0 ) {dev_err (&pdev->dev,"no IRQ specified\n" ); - ret = -ENXIO ; goto exit_mem; } -------------------------------------------------------------------List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
Hello,
Quoted 16 lines · Roel Kluin
dev->irqis unsigned,platform_get_irq()may return signed unnoticedSigned-off-by Roel Kluin <[email protected]>---
drivers/net/arm/am79c961a.c +1
-2@@ -693,11 +693,15 @@ static int __init am79c961_probe(struct platform_device *pdev)* done by the ether bootp loader. */ dev->base_addr = res->start; - dev->irq =platform_get_irq (pdev,0 ); + ret =platform_get_irq (pdev,0 ); - ret = -ENODEV ;
drivers/net/arm/am79c961a.c static int __init am79c961_probe(struct platform_device *pdev) · line 706
Quoted 10 lines
drivers/net/arm/am79c961a.c +6
-1-if (dev->irq <0 ) +if (ret <0 ) { + ret = -ENODEV ; goto nodev; + } + dev->irq = ret; + + ret = -ENODEV ;if (!request_region (dev->base_addr,0x18 , dev->name)) goto nodev;
For me the change looks fine.
Best regards
Uwe
Signature · 3 lines
Uwe Kleine-König, Software Engineer Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962
Jeff Garzik
AppliedQuoted 16 lines · Roel Kluin
dev->irqis unsigned,platform_get_irq()may return signed unnoticedSigned-off-by Roel Kluin <[email protected]>---
drivers/net/arm/am79c961a.c +1
-2@@ -693,11 +693,15 @@ static int __init am79c961_probe(struct platform_device *pdev)* done by the ether bootp loader. */ dev->base_addr = res->start; - dev->irq =platform_get_irq (pdev,0 ); + ret =platform_get_irq (pdev,0 ); - ret = -ENODEV ;
drivers/net/arm/am79c961a.c static int __init am79c961_probe(struct platform_device *pdev) · line 706
Quoted 10 lines
drivers/net/arm/am79c961a.c +6
-1-if (dev->irq <0 ) +if (ret <0 ) { + ret = -ENODEV ; goto nodev; + } + dev->irq = ret; + + ret = -ENODEV ;if (!request_region (dev->base_addr,0x18 , dev->name)) goto nodev;
applied