public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: am79c961a: platform_get_irq() may return signed unnoticed
@ 2008-04-23 21:44 Roel Kluin
  2008-04-23 21:49 ` [PATCH 2/2] ARM: ax88796: " Roel Kluin
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Roel Kluin @ 2008-04-23 21:44 UTC (permalink / raw)
  To: rmk, Linux-arm; +Cc: lkml

dev->irq is unsigned, platform_get_irq() may return signed unnoticed

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
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;
 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-04-29  6:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-23 21:44 [PATCH] ARM: am79c961a: platform_get_irq() may return signed unnoticed Roel Kluin
2008-04-23 21:49 ` [PATCH 2/2] ARM: ax88796: " Roel Kluin
2008-04-28 20:09   ` Russell King - ARM Linux
2008-04-24  6:11 ` [PATCH] ARM: am79c961a: " Uwe Kleine-König
2008-04-29  5:59 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox