Commit 5e19c93f authored by Atsushi Nemoto's avatar Atsushi Nemoto Committed by Kleber Sacilotto de Souza

net: altera_tse: fix connect_local_phy error path

BugLink: https://bugs.launchpad.net/bugs/1822271

[ Upstream commit 17b42a20 ]

The connect_local_phy should return NULL (not negative errno) on
error, since its caller expects it.
Signed-off-by: default avatarAtsushi Nemoto <atsushi.nemoto@sord.co.jp>
Acked-by: default avatarThor Thayer <thor.thayer@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarJuerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 0f410f0d
...@@ -716,8 +716,10 @@ static struct phy_device *connect_local_phy(struct net_device *dev) ...@@ -716,8 +716,10 @@ static struct phy_device *connect_local_phy(struct net_device *dev)
phydev = phy_connect(dev, phy_id_fmt, &altera_tse_adjust_link, phydev = phy_connect(dev, phy_id_fmt, &altera_tse_adjust_link,
priv->phy_iface); priv->phy_iface);
if (IS_ERR(phydev)) if (IS_ERR(phydev)) {
netdev_err(dev, "Could not attach to PHY\n"); netdev_err(dev, "Could not attach to PHY\n");
phydev = NULL;
}
} else { } else {
int ret; int ret;
......
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