Re: [PATCH] ixp4xx_eth: fix error check return value of platform_get_irq()

From: Linus Walleij
Date: Tue Apr 12 2022 - 09:46:08 EST


On Tue, Apr 12, 2022 at 10:51 AM <cgel.zte@xxxxxxxxx> wrote:

> From: Lv Ruyi <lv.ruyi@xxxxxxxxxx>
>
> platform_get_irq() return negative value on failure, so null check of
> return value is incorrect. Fix it by comparing whether it is less than
> zero.
>
> Fixes: 9055a2f59162 ("ixp4xx_eth: make ptp support a platform driver")
> Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
> Signed-off-by: Lv Ruyi <lv.ruyi@xxxxxxxxxx>

Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Yours,
Linus Walleij