]> 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)
committerJakub Kicinski <kuba@kernel.org>
Tue, 12 Apr 2022 21:59:42 +0000 (14:59 -0700)
commit9c5821d27f2e808ce292a386f0c4596820b65ba4
tree1864da2fbe83608c76fd4699d772b58349d17fd7
parent51e946572da7f9505e4ce1144d334c756ae577e0
ixp4xx_eth: fix error check return value of platform_get_irq()

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: ec03284d3982 ("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>
drivers/net/ethernet/xscale/ptp_ixp46x.c