net: bgmac: Fix return value check for fixed_phy_register()
authorRuan Jinjie <ruanjinjie@huawei.com>
Fri, 18 Aug 2023 05:12:20 +0000 (13:12 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Aug 2023 14:11:02 +0000 (16:11 +0200)
commit029e491b8c11859525a1d6a307622bbc3a4ae559
tree37744731c65e756a56536be7fd5c51745a54a93a
parentac259251487a174ece97dd745727e39712f18ebf
net: bgmac: Fix return value check for fixed_phy_register()

[ Upstream commit 23a14488ea5882dea5851b65c9fce2127ee8fcad ]

The fixed_phy_register() function returns error pointers and never
returns NULL. Update the checks accordingly.

Fixes: c25b23b8a387 ("bgmac: register fixed PHY for ARM BCM470X / BCM5301X chipsets")
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/broadcom/bgmac.c