提交 7d8dd20e 编写于 作者: T Tushar Behera 提交者: Linus Walleij

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: NTushar Behera <tushar.behera@linaro.org>
Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 5f007db6
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册