Commit df555b66 authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller

netdev: octeon: fix return value check in octeon_mgmt_init_phy()

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

dpatch engine is used to auto generate this patch.
Signed-off-by: default avatarWei Yongjun <>
Signed-off-by: default avatarDavid S. Miller <>
parent bc9259a8
......@@ -722,10 +722,8 @@ static int octeon_mgmt_init_phy(struct net_device *netdev)
octeon_mgmt_adjust_link, 0,
if (IS_ERR(p->phydev)) {
p->phydev = NULL;
if (!p->phydev)
return -1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment