patch-2.4.4 linux/drivers/net/sunbmac.c

Next file: linux/drivers/net/sundance.c
Previous file: linux/drivers/net/sun3lance.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.3/linux/drivers/net/sunbmac.c linux/drivers/net/sunbmac.c
@@ -1,4 +1,4 @@
-/* $Id: sunbmac.c,v 1.25 2001/02/18 08:10:21 davem Exp $
+/* $Id: sunbmac.c,v 1.27 2001/04/23 03:57:48 davem Exp $
  * sunbmac.c: Driver for Sparc BigMAC 100baseT ethernet adapters.
  *
  * Copyright (C) 1997, 1998, 1999 David S. Miller (davem@redhat.com)
@@ -63,7 +63,7 @@
 #define DIRQ(x)
 #endif
 
-static struct bigmac *root_bigmac_dev = NULL;
+static struct bigmac *root_bigmac_dev;
 
 #define DEFAULT_JAMSIZE    4 /* Toe jam */
 
@@ -910,7 +910,10 @@
 		return ret;
 	}
 	init_timer(&bp->bigmac_timer);
-	return bigmac_init(bp, 0);
+	ret = bigmac_init(bp, 0);
+	if (ret)
+		free_irq(dev->irq, bp);
+	return ret;
 }
 
 static int bigmac_close(struct net_device *dev)
@@ -923,7 +926,7 @@
 
 	bigmac_stop(bp);
 	bigmac_clean_rings(bp);
-	free_irq(dev->irq, (void *)bp);
+	free_irq(dev->irq, bp);
 	return 0;
 }
 
@@ -1249,7 +1252,7 @@
 	struct net_device *dev = NULL;
 	struct sbus_bus *sbus;
 	struct sbus_dev *sdev = 0;
-	static int called = 0;
+	static int called;
 	int cards = 0, v;
 
 	root_bigmac_dev = NULL;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)