Skip to contentSkip to conversation

atmel_lcdfb: unsigned irq_base cannot be negative

PATCH In review roel kluin 2 participants 2 messages Oct 20, 2008 – Oct 21, 2008

Subsystems (2)
lore
Share & tools
lore

roel kluin

author
#0 lore raw

PATCH 1/1 atmel_lcdfb: unsigned irq_base cannot be negative

unsigned irq_base cannot be negative

---

drivers/video/atmel_lcdfb.c +3 -3
index f8d0a57..f93f57a 100644
@@ -857,12 +857,12 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
 		goto stop_clk;
 	}
 
-	sinfo->irq_base = platform_get_irq(pdev, 0);
-	if (sinfo->irq_base < 0) {
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0) {
 		dev_err(dev, "unable to get irq\n");
-		ret = sinfo->irq_base;
 		goto stop_clk;
 	}
+	sinfo->irq_base = ret;
 
 	/* Initialize video memory */
 	map = platform_get_resource(pdev, IORESOURCE_MEM, 1);

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

#1 lore raw

Hi,

roel kluin :

Quoted 1 line

unsigned irq_base cannot be negative

Indeed. Thanks for taking this point !

Quoted 9 lines

---

drivers/video/atmel_lcdfb.c +0 -0
index f8d0a57..f93f57a 100644
@@ -857,12 +857,12 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
 		goto stop_clk;
 	}

drivers/video/atmel_lcdfb.c static int __init atmel_lcdfb_probe(struct platform_device *pdev) · line 865

Quoted 10 lines
drivers/video/atmel_lcdfb.c +3 -3
 
-	sinfo->irq_base = platform_get_irq(pdev, 0);
-	if (sinfo->irq_base < 0) {
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0) {
 		dev_err(dev, "unable to get irq\n");
-		ret = sinfo->irq_base;
 		goto stop_clk;
 	}
+	sinfo->irq_base = ret;

I prefer changing the definition of irq_base to plain int.

So the patch becomes obvious:

-       unsigned long           irq_base;
+       int                     irq_base;

What do you think of this ?

I repost a patch addressing this issue.

Regards,

Signature · 1 line
Nicolas Ferre