Skip to content

Commit

Permalink
asic3: platform_get_irq() may return signed unnoticed
Browse files Browse the repository at this point in the history
asic->irq_nr is unsigned. platform_get_irq() may return signed unnoticed

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Cc: Joe Perches <joe@perches.com>
Acked-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Roel Kluin authored and Linus Torvalds committed Jul 26, 2008
1 parent f3c6ba9 commit c491b2f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/mfd/asic3.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,12 @@ static int __init asic3_irq_probe(struct platform_device *pdev)
unsigned long clksel = 0;
unsigned int irq, irq_base;
int map_size;
int ret;

asic->irq_nr = platform_get_irq(pdev, 0);
if (asic->irq_nr < 0)
return asic->irq_nr;
ret = platform_get_irq(pdev, 0);
if (ret < 0)
return ret;
asic->irq_nr = ret;

/* turn on clock to IRQ controller */
clksel |= CLOCK_SEL_CX;
Expand Down

0 comments on commit c491b2f

Please sign in to comment.