From 7d8dd20e56be0196fd015feb19ca38449c607794 Mon Sep 17 00:00:00 2001 From: Tushar Behera Date: Fri, 16 Nov 2012 12:20:39 +0530 Subject: [PATCH] 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 Acked-by: Viresh Kumar Signed-off-by: Linus Walleij --- drivers/pinctrl/spear/pinctrl-plgpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { 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);