netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yongjun <weiyongjun1@huawei.com>
To: Jassi Brar <jaswinder.singh@linaro.org>
Cc: Wei Yongjun <weiyongjun1@huawei.com>, <netdev@vger.kernel.org>,
	<kernel-janitors@vger.kernel.org>
Subject: [PATCH net-next] net: socionext: Fix error return code in netsec_netdev_open()
Date: Thu, 11 Jan 2018 11:21:38 +0000	[thread overview]
Message-ID: <1515669698-126382-1-git-send-email-weiyongjun1@huawei.com> (raw)

Fix to return error code -ENODEV from the of_phy_connect() error
handling case instead of 0, as done elsewhere in this function.

Fixes: 533dd11a12f6 ("net: socionext: Add Synquacer NetSec driver")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/ethernet/socionext/netsec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c
index a8edcf3..78e4ff6 100644
--- a/drivers/net/ethernet/socionext/netsec.c
+++ b/drivers/net/ethernet/socionext/netsec.c
@@ -1292,6 +1292,7 @@ static int netsec_netdev_open(struct net_device *ndev)
 				    netsec_phy_adjust_link, 0,
 				    priv->phy_interface)) {
 			netif_err(priv, link, priv->ndev, "missing PHY\n");
+			ret = -ENODEV;
 			goto err3;
 		}
 	} else {


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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11 11:21 Wei Yongjun [this message]
2018-01-11 18:55 ` [PATCH net-next] net: socionext: Fix error return code in netsec_netdev_open() 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=1515669698-126382-1-git-send-email-weiyongjun1@huawei.com \
    --to=weiyongjun1@huawei.com \
    --cc=jaswinder.singh@linaro.org \
    --cc=kernel-janitors@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).