Commit 455d39ec authored by Ruan Jinjie's avatar Ruan Jinjie Committed by Bartosz Golaszewski

gpio: ftgpio010: Do not check for 0 return after calling platform_get_irq()

Since commit a85a6c86 ("driver core: platform: Clarify that IRQ 0
is invalid"), there is no possible for platform_get_irq() to return 0.

And the return value of platform_get_irq() is more sensible
to show the error reason.
Signed-off-by: default avatarRuan Jinjie <ruanjinjie@huawei.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
parent 146bf98e
......@@ -250,8 +250,8 @@ static int ftgpio_gpio_probe(struct platform_device *pdev)
return PTR_ERR(g->base);
irq = platform_get_irq(pdev, 0);
if (irq <= 0)
return irq ? irq : -EINVAL;
if (irq < 0)
return irq;
g->clk = devm_clk_get(dev, NULL);
if (!IS_ERR(g->clk)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment