Re: [PATCH] power: gemini-poweroff: Fix IRQ check in gemini_poweroff_probe
From: Linus Walleij
Date: Sat Jan 22 2022 - 20:01:41 EST
On Thu, Jan 20, 2022 at 11:47 AM Miaoqian Lin <linmq006@xxxxxxxxx> wrote:
> 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: f7a388d6cd1c ("power: reset: Add a driver for the Gemini poweroff")
> Signed-off-by: Miaoqian Lin <linmq006@xxxxxxxxx>
Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
Yours,
Linus Walleij