]> Pileus Git - ~andy/linux/blobdiff - drivers/staging/wlags49_h2/wl_cs.c
Merge branch 'x86-mce-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[~andy/linux] / drivers / staging / wlags49_h2 / wl_cs.c
index a2cbb29c3f597e0ce01c79115778f0e5be8edd56..7c7c77f9c86266e87213c4907b0074dcdf56b2f2 100644 (file)
@@ -74,7 +74,6 @@
 #include <linux/in.h>
 #include <linux/delay.h>
 #include <asm/io.h>
-#include <asm/system.h>
 #include <asm/bitops.h>
 
 #include <linux/netdevice.h>
@@ -178,10 +177,9 @@ static void wl_adapter_detach(struct pcmcia_device *link)
        if (dev) {
                unregister_wlags_sysfs(dev);
                unregister_netdev(dev);
+               wl_device_dealloc(dev);
        }
 
-       wl_device_dealloc(dev);
-
        DBG_LEAVE(DbgInfo);
 } /* wl_adapter_detach */
 /*============================================================================*/