Skip to content

Commit

Permalink
pinctrl: SPEAr: Update error check for unsigned variables
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tushar Behera authored and Linus Walleij committed Nov 23, 2012
1 parent 5f007db commit 7d8dd20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pinctrl/spear/pinctrl-plgpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7d8dd20

Please sign in to comment.