patch-2.1.88 linux/drivers/net/cs89x0.c

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

diff -u --recursive --new-file v2.1.87/linux/drivers/net/cs89x0.c linux/drivers/net/cs89x0.c
@@ -44,7 +44,6 @@
 
 /* Always include 'config.h' first in case the user wants to turn on
    or override something. */
-#include <linux/config.h>
 #ifdef MODULE
 #include <linux/module.h>
 #include <linux/version.h>
@@ -1078,11 +1077,11 @@
 
         if (dev_cs89x0.priv != NULL) {
                 /* Free up the private structure, or leak memory :-)  */
+                unregister_netdev(&dev_cs89x0);
                 kfree(dev_cs89x0.priv);
                 dev_cs89x0.priv = NULL;	/* gets re-allocated by cs89x0_probe1 */
                 /* If we don't do this, we can't re-insmod it later. */
                 release_region(dev_cs89x0.base_addr, NETCARD_IO_EXTENT);
-                unregister_netdev(&dev_cs89x0);
         }
 }
 #endif /* MODULE */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov