wl1251: fix crash on remove due to premature kfree
[pandora-kernel.git] / drivers / net / wireless / wl1251 / sdio.c
index f786942..1b851f6 100644 (file)
@@ -315,8 +315,8 @@ static void __devexit wl1251_sdio_remove(struct sdio_func *func)
 
        if (wl->irq)
                free_irq(wl->irq, wl);
-       kfree(wl_sdio);
        wl1251_free_hw(wl);
+       kfree(wl_sdio);
 
        sdio_claim_host(func);
        sdio_release_irq(func);