phy: Sparx5 Eth SerDes: Fix return value check in sparx5_serdes_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Thu, 9 Sep 2021 07:21:49 +0000 (15:21 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:56 +0000 (19:16 +0100)
commitd0379ee4a864b5aa0f864e4c3f0b0b1bace6e364
treeb9805e30cf4c90ee128d4ede0a5209f276a96f6d
parent34f5e44c8f2dbe55f42ff238d6b16094fa22aaf9
phy: Sparx5 Eth SerDes: Fix return value check in sparx5_serdes_probe()

[ Upstream commit b4dc97ab0a629eda8bda20d96ef47dac08a505d9 ]

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

Fixes: 2ff8a1eeb5aa ("phy: Add Sparx5 ethernet serdes PHY driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210909072149.2934047-1-yangyingliang@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/phy/microchip/sparx5_serdes.c