diff options
author | Madalin Bucur <madalin.bucur@nxp.com> | 2017-01-04 13:21:29 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-04 13:45:08 -0500 |
commit | 3fe61f0940d9c7892462c893602fdccfe8b24e8c (patch) | |
tree | 72cb72ab1b83f6d56c2cb1a547bcd9caee124c0d /drivers | |
parent | c030af878f04b77011f6876e8c4f0530c26ed6d4 (diff) | |
download | linux-3fe61f0940d9c7892462c893602fdccfe8b24e8c.tar.bz2 |
dpaa_eth: cleanup after init_phy() failure
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index 624ba9058dc4..77517aa3e8d9 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -2291,7 +2291,8 @@ static int dpaa_open(struct net_device *net_dev) net_dev->phydev = mac_dev->init_phy(net_dev, priv->mac_dev); if (!net_dev->phydev) { netif_err(priv, ifup, net_dev, "init_phy() failed\n"); - return -ENODEV; + err = -ENODEV; + goto phy_init_failed; } for (i = 0; i < ARRAY_SIZE(mac_dev->port); i++) { @@ -2314,6 +2315,7 @@ mac_start_failed: for (i = 0; i < ARRAY_SIZE(mac_dev->port); i++) fman_port_disable(mac_dev->port[i]); +phy_init_failed: dpaa_eth_napi_disable(priv); return err; |