ixp4xx_eth: fix error check return value of platform_get_irq()
authorLv Ruyi <lv.ruyi@zte.com.cn>
Tue, 12 Apr 2022 08:51:26 +0000 (08:51 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:46 +0000 (10:22 +0200)
commit0377e8f544a382c00270260a97342b0e9676e592
treeeb81b7035428d1ee83731a69609e6763342b141e
parentffd4ae87a9f62cd93631c4bf1e575a0399136a30
ixp4xx_eth: fix error check return value of platform_get_irq()

[ Upstream commit f45ba67eb74ab4b775616af731bdf8944afce3f1 ]

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@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20220412085126.2532924-1-lv.ruyi@zte.com.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/xscale/ptp_ixp46x.c