atmel_lcdfb: unsigned irq_base cannot be negative
Subsystems (2)
PATCH 1/1 atmel_lcdfb: unsigned irq_base cannot be negative
unsigned irq_base cannot be negative
---
drivers/video/atmel_lcdfb.c +3 -3
@@ -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=/
Hi,
roel kluin :
Quoted 1 line
unsigned
irq_basecannot be negative
Indeed. Thanks for taking this point !
Quoted 9 lines
Signed-off-by Roel Kluin <[email protected]>---
drivers/video/atmel_lcdfb.c +0
-0@@ -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