]> git.baikalelectronics.ru Git - kernel.git/commit
phy: phy-ocelot-serdes: fix return value check in serdes_probe()
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 10 Oct 2018 02:00:24 +0000 (02:00 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Oct 2018 05:54:26 +0000 (22:54 -0700)
commit1913efee8abd343dd95eff5dd075ffa0a62df767
treeddd1613503b2b6499dd3bd75f5816493c54f1f51
parent704217e68f1f6fc799aa598ec1332d4c4f71ae77
phy: phy-ocelot-serdes: fix return value check in serdes_probe()

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

Fixes: d8b567387d12 ("phy: add driver for Microsemi Ocelot SerDes muxing")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Quentin Schulz <quentin.schulz@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/phy/mscc/phy-ocelot-serdes.c