Re: [PATCH] mfd: fix error check return value of platform_get_irq()
From: Linus Walleij
Date: Tue Apr 12 2022 - 09:46:31 EST
On Tue, Apr 12, 2022 at 10:53 AM <cgel.zte@xxxxxxxxx> wrote:
> From: Lv Ruyi <lv.ruyi@xxxxxxxxxx>
>
> platform_get_irq() return negative value on failure, so null check of
> irq is incorrect. Fix it by comparing whether it is less than zero.
>
> Fixes: dcc21cc09e3c ("mfd: Add driver for Atmel Microcontroller on iPaq h3xxx")
> Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
> Signed-off-by: Lv Ruyi <lv.ruyi@xxxxxxxxxx>
Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
Yours,
Linus Walleij