]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit52cc19b72bd78c4e16349800ea84715e2d36c60c
treeeb81b7035428d1ee83731a69609e6763342b141e
parent679620f7af6eda929eefe0e10c7f050526a828c5
ixp4xx_eth: fix error check return value of platform_get_irq()

[ Upstream commit c402d260c17f9479e4d3b3eefdb8613f4a6c1292 ]

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: c8f6e68b75f5 ("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