Commit 7d8dd20e56be0196fd015feb19ca38449c607794

Authored by Tushar Behera
Committed by Linus Walleij
1 parent 5f007db68c

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/pinctrl/spear/pinctrl-plgpio.c
... ... @@ -284,7 +284,7 @@
284 284 {
285 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 288 return -EINVAL;
289 289  
290 290 return irq_find_mapping(plgpio->irq_domain, offset);