Miaoqian Lin 405d639ac4 gpio: idt3243x: Fix IRQ check in idt_gpio_probe
commit 30fee1d7462a446ade399c0819717a830cbdca69 upstream.

platform_get_irq() returns negative error number instead 0 on failure.
And the doc of platform_get_irq() provides a usage example:

    int irq = platform_get_irq(pdev, 0);
    if (irq < 0)
        return irq;

Fix the check of return value to catch errors correctly.

Fixes: 4195926aedca ("gpio: Add support for IDT 79RC3243x GPIO controller")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-27 11:05:31 +01:00
..
2020-07-20 15:34:59 +02:00
2021-04-14 10:19:22 +01:00
2021-09-07 12:27:27 -07:00
2020-01-15 11:24:19 +01:00
2021-05-05 16:07:41 +02:00
2021-09-07 12:27:27 -07:00
2021-09-07 12:27:27 -07:00
2019-11-07 09:27:48 +01:00
2021-09-28 16:10:42 -07:00
2020-12-09 15:17:24 +01:00
2021-09-07 12:27:27 -07:00
2021-08-29 21:19:50 +02:00
2021-12-29 12:28:43 +01:00
2019-12-09 10:40:18 +01:00
2020-12-09 15:17:24 +01:00