Commit f1d26d60 authored by Ruan Jinjie's avatar Ruan Jinjie Committed by sanglipeng
Browse files

net: bcmgenet: Fix return value check for fixed_phy_register()

stable inclusion
from stable-v5.10.193
commit 67c8d7ef54df41ef394c669fae2c26632c7a64cd
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I9399M

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=67c8d7ef54df41ef394c669fae2c26632c7a64cd



--------------------------------

[ Upstream commit 32bbe64a ]

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

Fixes: b0ba512e ("net: bcmgenet: enable driver to work without a device tree")
Signed-off-by: default avatarRuan Jinjie <ruanjinjie@huawei.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Acked-by: default avatarDoug Berger <opendmb@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 386c896d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment