netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 5/7] ep93xx: some minor cleanups to the ep93xx eth driver
@ 2006-12-19 21:08 akpm
  2006-12-26 21:41 ` Jeff Garzik
  0 siblings, 1 reply; 7+ messages in thread
From: akpm @ 2006-12-19 21:08 UTC (permalink / raw)
  To: jeff; +Cc: netdev, akpm, burman.yan, rmk

From: Yan Burman <burman.yan@gmail.com>

Small cleanup in the Cirrus Logic EP93xx ethernet driver: Check for NULL
pointer before dereferencing it instead of after.  Remove unreferenced
variable.

Signed-off-by: Yan Burman <burman.yan@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 drivers/net/arm/ep93xx_eth.c |    4 +---
 1 files changed, 1 insertion(+), 3 deletions(-)

diff -puN drivers/net/arm/ep93xx_eth.c~ep93xx-some-minor-cleanups-to-the-ep93xx-eth-driver drivers/net/arm/ep93xx_eth.c
--- a/drivers/net/arm/ep93xx_eth.c~ep93xx-some-minor-cleanups-to-the-ep93xx-eth-driver
+++ a/drivers/net/arm/ep93xx_eth.c
@@ -780,12 +780,10 @@ static struct ethtool_ops ep93xx_ethtool
 struct net_device *ep93xx_dev_alloc(struct ep93xx_eth_data *data)
 {
 	struct net_device *dev;
-	struct ep93xx_priv *ep;
 
 	dev = alloc_etherdev(sizeof(struct ep93xx_priv));
 	if (dev == NULL)
 		return NULL;
-	ep = netdev_priv(dev);
 
 	memcpy(dev->dev_addr, data->dev_addr, ETH_ALEN);
 
@@ -840,9 +838,9 @@ static int ep93xx_eth_probe(struct platf
 	struct ep93xx_priv *ep;
 	int err;
 
-	data = pdev->dev.platform_data;
 	if (pdev == NULL)
 		return -ENODEV;
+	data = pdev->dev.platform_data;
 
 	dev = ep93xx_dev_alloc(data);
 	if (dev == NULL) {
_

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-12-28  3:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-19 21:08 [patch 5/7] ep93xx: some minor cleanups to the ep93xx eth driver akpm
2006-12-26 21:41 ` Jeff Garzik
2006-12-26 21:42   ` Lennert Buytenhek
2006-12-26 21:48     ` Lennert Buytenhek
2006-12-26 21:50     ` Jeff Garzik
2006-12-26 22:56     ` Russell King
2006-12-28  3:38       ` [PATCH] Update CREDITS and MAINTAINERS entries for Lennert Buytenhek Lennert Buytenhek

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).