Merge tag 'asm-generic-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd...
[linux-2.6-block.git] / net / mac802154 / main.c
index e8cab5bb80c664669f9c34b36e5e9178db83ae13..87da85ae5a6b1ace5f6cdda2c0a9b8e01c8c5ba6 100644 (file)
@@ -218,7 +218,6 @@ void ieee802154_unregister_hw(struct ieee802154_hw *hw)
 
        tasklet_kill(&local->tasklet);
        flush_workqueue(local->workqueue);
-       destroy_workqueue(local->workqueue);
 
        rtnl_lock();
 
@@ -226,6 +225,7 @@ void ieee802154_unregister_hw(struct ieee802154_hw *hw)
 
        rtnl_unlock();
 
+       destroy_workqueue(local->workqueue);
        wpan_phy_unregister(local->phy);
 }
 EXPORT_SYMBOL(ieee802154_unregister_hw);