Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17b42a20 authored by Atsushi Nemoto's avatar Atsushi Nemoto Committed by David S. Miller
Browse files

net: altera_tse: fix connect_local_phy error path



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>
parent 5d9bf433
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -714,8 +714,10 @@ static struct phy_device *connect_local_phy(struct net_device *dev)

		phydev = phy_connect(dev, phy_id_fmt, &altera_tse_adjust_link,
				     priv->phy_iface);
		if (IS_ERR(phydev))
		if (IS_ERR(phydev)) {
			netdev_err(dev, "Could not attach to PHY\n");
			phydev = NULL;
		}

	} else {
		int ret;