]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: adi: Fix return value check in adin1110_probe_netdevs()
authorWei Yongjun <weiyongjun1@huawei.com>
Thu, 22 Sep 2022 02:10:23 +0000 (02:10 +0000)
committerJakub Kicinski <kuba@kernel.org>
Mon, 26 Sep 2022 19:44:40 +0000 (12:44 -0700)
commit7ccd4f86342a9871e60b026094f0d76a3ba81164
tree3925f591e83cba68a309bb3913de2913443df25a
parent68a15770bcefc36b826c3002bf2e4d768e578266
net: ethernet: adi: Fix return value check in adin1110_probe_netdevs()

In case of error, the function get_phy_device() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check
should be replaced with IS_ERR().

Fixes: 40a42b62cfa9 ("net: ethernet: adi: Add ADIN1110 support")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20220922021023.811581-1-weiyongjun@huaweicloud.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/adi/adin1110.c