dect
/
linux-2.6
Archived
13
0
Fork 0

pinctrl: SPEAr: Update error check for unsigned variables

Checking '< 0' for unsigned variables always returns false. For error
codes, use IS_ERR_VALUE() instead.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Tushar Behera 2012-11-16 12:20:39 +05:30 committed by Linus Walleij
parent 5f007db68c
commit 7d8dd20e56
1 changed files with 1 additions and 1 deletions

View File

@ -284,7 +284,7 @@ static int plgpio_to_irq(struct gpio_chip *chip, unsigned offset)
{
struct plgpio *plgpio = container_of(chip, struct plgpio, chip);
if (plgpio->irq_base < 0)
if (IS_ERR_VALUE(plgpio->irq_base))
return -EINVAL;
return irq_find_mapping(plgpio->irq_domain, offset);