From: Dan Carpenter <dan.carpenter@oracle.com>
To: Byungho An <bh74.an@samsung.com>
Cc: Girish K S <ks.giri@samsung.com>,
Siva Reddy Kallam <siva.kallam@samsung.com>,
Vipul Pandya <vipul.pandya@samsung.com>,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch 1/3] net: sxgbe: sxgbe_mdio_register() frees the bus
Date: Tue, 1 Apr 2014 16:38:44 +0300 [thread overview]
Message-ID: <20140401133844.GA11536@mwanda> (raw)
"err" is always zero at this point so we always unregister and free the
mdio_bus before returning success. This seems like left over code and
I have deleted it.
Fixes: 1edb9ca69e8a ('net: sxgbe: add basic framework for Samsung 10Gb ethernet driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Static analysis. Untested.
diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_mdio.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_mdio.c
index b0eb0a2..01af2cb 100644
--- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_mdio.c
+++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_mdio.c
@@ -219,13 +219,6 @@ int sxgbe_mdio_register(struct net_device *ndev)
}
}
- if (!err) {
- netdev_err(ndev, "PHY not found\n");
- mdiobus_unregister(mdio_bus);
- mdiobus_free(mdio_bus);
- goto mdiobus_err;
- }
-
priv->mii = mdio_bus;
return 0;
next reply other threads:[~2014-04-01 13:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-01 13:38 Dan Carpenter [this message]
2014-04-01 20:23 ` [patch 1/3] net: sxgbe: sxgbe_mdio_register() frees the bus David Miller
2014-04-02 6:55 ` Byungho An
2014-04-01 20:27 ` 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=20140401133844.GA11536@mwanda \
--to=dan.carpenter@oracle.com \
--cc=bh74.an@samsung.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=ks.giri@samsung.com \
--cc=netdev@vger.kernel.org \
--cc=siva.kallam@samsung.com \
--cc=vipul.pandya@samsung.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;
as well as URLs for NNTP newsgroup(s).