public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.19] ep93xx: Some minor cleanups to the ep93xx eth driver
@ 2006-12-12 17:00 Yan Burman
  0 siblings, 0 replies; only message in thread
From: Yan Burman @ 2006-12-12 17:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: trivial

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>

--- linux-2.6.19_orig/drivers/net/arm/ep93xx_eth.c	2006-11-30 21:28:21.000000000 +0200
+++ linux-2.6.19/drivers/net/arm/ep93xx_eth.c	2006-12-12 18:38:48.000000000 +0200
@@ -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] only message in thread

only message in thread, other threads:[~2006-12-12 16:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-12 17:00 [PATCH 2.6.19] ep93xx: Some minor cleanups to the ep93xx eth driver Yan Burman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox