From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, zajec5@gmail.com, hauke@hauke-m.de,
nlhintz@hotmail.com, sd@queasysnail.net,
bhutchings@solarflare.com,
Florian Fainelli <f.fainelli@gmail.com>
Subject: [PATCH net-next] bgmac: propagate error codes in bgmac_probe()
Date: Sun, 12 Jan 2014 19:05:55 -0800 [thread overview]
Message-ID: <1389582355-27514-1-git-send-email-f.fainelli@gmail.com> (raw)
bgmac_mii_register() and register_netdev() both return appropriate error
codes for the failures they would encounter, propagate this error code
instead of overriding the value with -ENOTSUPP which is not the correct
error code to return.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
Sabrina, Ben, this relates to the thread on -ENOTSUPP, other places in
the driver need fixing too, but this has to be done as a separate patch
anyway.
drivers/net/ethernet/broadcom/bgmac.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
index 7f968a9..0297a79 100644
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
@@ -1518,14 +1518,12 @@ static int bgmac_probe(struct bcma_device *core)
err = bgmac_mii_register(bgmac);
if (err) {
bgmac_err(bgmac, "Cannot register MDIO\n");
- err = -ENOTSUPP;
goto err_dma_free;
}
err = register_netdev(bgmac->net_dev);
if (err) {
bgmac_err(bgmac, "Cannot register net device\n");
- err = -ENOTSUPP;
goto err_mii_unregister;
}
--
1.8.3.2
next reply other threads:[~2014-01-13 3:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-13 3:05 Florian Fainelli [this message]
2014-01-13 5:58 ` [PATCH net-next] bgmac: propagate error codes in bgmac_probe() Rafał Miłecki
2014-01-15 2:18 ` 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=1389582355-27514-1-git-send-email-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=hauke@hauke-m.de \
--cc=netdev@vger.kernel.org \
--cc=nlhintz@hotmail.com \
--cc=sd@queasysnail.net \
--cc=zajec5@gmail.com \
/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