summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRoel Kluin <12o3l@tiscali.nl>2008-04-23 23:44:03 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-04-28 21:24:44 +0100
commit62783679540fbdfd74e10fbe9478d978141ba45f (patch)
tree621e7aa66ffbd0296b3d76cc48f8d2ca837a36e8 /drivers
parent26eed9a5c61edd93d88e147188d4feae6770174e (diff)
downloadop-kernel-dev-62783679540fbdfd74e10fbe9478d978141ba45f.zip
op-kernel-dev-62783679540fbdfd74e10fbe9478d978141ba45f.tar.gz
[ARM] am79c961a: platform_get_irq() may return signed unnoticed
dev->irq is unsigned, platform_get_irq() may return signed unnoticed Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/arm/am79c961a.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/arm/am79c961a.c b/drivers/net/arm/am79c961a.c
index ba6bd03..a637910 100644
--- a/drivers/net/arm/am79c961a.c
+++ b/drivers/net/arm/am79c961a.c
@@ -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;
OpenPOWER on IntegriCloud