linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pata-rb532-cf: platform_get_irq() failure ignored
@ 2009-03-03 13:04 Roel Kluin
  2009-03-05 12:23 ` Jeff Garzik
  0 siblings, 1 reply; 6+ messages in thread
From: Roel Kluin @ 2009-03-03 13:04 UTC (permalink / raw)
  To: jgarzik; +Cc: linux-ide, Andrew Morton

------------------------------>8-------------8<---------------------------------
platform_get_irq() can return -ENXIO, but since 'irq' is an unsigned int, it
does not show when the IRQ resource wasn't found.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c
index ebfcda2..fe8178c 100644
--- a/drivers/ata/pata_rb532_cf.c
+++ b/drivers/ata/pata_rb532_cf.c
@@ -173,11 +173,12 @@ static __devinit int rb532_pata_driver_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	irq = platform_get_irq(pdev, 0);
-	if (irq <= 0) {
+	ret = platform_get_irq(pdev, 0);
+	if (ret <= 0) {
 		dev_err(&pdev->dev, "no IRQ resource found\n");
 		return -ENOENT;
 	}
+	irq = ret;
 
 	gpio = irq_to_gpio(irq);
 	if (gpio < 0) {

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

end of thread, other threads:[~2009-03-25  2:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-03 13:04 [PATCH] pata-rb532-cf: platform_get_irq() failure ignored Roel Kluin
2009-03-05 12:23 ` Jeff Garzik
2009-03-06 16:43   ` Phil Sutter
2009-03-13 14:41     ` Florian Fainelli
2009-03-14  0:51       ` Phil Sutter
2009-03-25  2:16       ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).