net/mlxbf_gige: Fix an IS_ERR() vs NULL bug in mlxbf_gige_mdio_probe
authorPeng Wu <wupeng58@huawei.com>
Fri, 23 Sep 2022 02:36:40 +0000 (02:36 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Oct 2022 08:39:43 +0000 (10:39 +0200)
commite9d7d809022e32e3e6d80e068b1d740c6bc350ad
tree43254efa900bda83669cd484d396cfc84368eed0
parent8b1b908507ce2f060fb93084a2ac36cf237e2f39
net/mlxbf_gige: Fix an IS_ERR() vs NULL bug in mlxbf_gige_mdio_probe

[ Upstream commit 4774db8dfc6a2e6649920ebb2fc8e2f062c2080d ]

The devm_ioremap() function returns NULL on error, it doesn't return
error pointers.

Fixes: 3a1a274e933f ("mlxbf_gige: compute MDIO period based on i1clk")
Signed-off-by: Peng Wu <wupeng58@huawei.com>
Link: https://lore.kernel.org/r/20220923023640.116057-1-wupeng58@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c