Netdev List
 help / color / mirror / Atom feed
From: Madalin Bucur <madalin.bucur@nxp.com>
To: <netdev@vger.kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org, davem@davemloft.net,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] dpaa_eth: cleanup after init_phy() failure
Date: Wed, 4 Jan 2017 13:21:29 +0200	[thread overview]
Message-ID: <1483528890-8621-2-git-send-email-madalin.bucur@nxp.com> (raw)
In-Reply-To: <1483528890-8621-1-git-send-email-madalin.bucur@nxp.com>

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
---
 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index 624ba90..77517aa 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 @@ static int dpaa_open(struct net_device *net_dev)
 	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;
-- 
2.1.0

  reply	other threads:[~2017-01-04 11:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-04 11:21 [PATCH 0/2] dpaa_eth: a couple of fixes Madalin Bucur
2017-01-04 11:21 ` Madalin Bucur [this message]
2017-01-04 11:21 ` [PATCH 2/2] dpaa_eth: Initialize CGR structure before init Madalin Bucur
2017-01-04 18:45 ` [PATCH 0/2] dpaa_eth: a couple of fixes David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1483528890-8621-2-git-send-email-madalin.bucur@nxp.com \
    --to=madalin.bucur@nxp.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox