diff options
author | Tushar Behera <tushar.behera@linaro.org> | 2012-11-16 01:50:39 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-11-23 02:33:41 -0500 |
commit | 7d8dd20e56be0196fd015feb19ca38449c607794 (patch) | |
tree | 4e3952e33e11ae4923cf49dd4695ef7c9b774bb1 /drivers/pinctrl/spear | |
parent | 5f007db68cc01e068f3e12b30151f3b68418cd79 (diff) |
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>
Diffstat (limited to 'drivers/pinctrl/spear')
-rw-r--r-- | drivers/pinctrl/spear/pinctrl-plgpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c index 5aebbf780fb5..4c045053bbdd 100644 --- a/drivers/pinctrl/spear/pinctrl-plgpio.c +++ b/drivers/pinctrl/spear/pinctrl-plgpio.c | |||
@@ -284,7 +284,7 @@ static int plgpio_to_irq(struct gpio_chip *chip, unsigned offset) | |||
284 | { | 284 | { |
285 | struct plgpio *plgpio = container_of(chip, struct plgpio, chip); | 285 | struct plgpio *plgpio = container_of(chip, struct plgpio, chip); |
286 | 286 | ||
287 | if (plgpio->irq_base < 0) | 287 | if (IS_ERR_VALUE(plgpio->irq_base)) |
288 | return -EINVAL; | 288 | return -EINVAL; |
289 | 289 | ||
290 | return irq_find_mapping(plgpio->irq_domain, offset); | 290 | return irq_find_mapping(plgpio->irq_domain, offset); |