mac802154: Fixes kernel oops when unloading a radio driver

Destroying the workqueue before unregistering the net device caused a
kernel oops

Signed-off-by: Koen Zandberg <koen@bergzand.net>
Acked-by: Alexander Aring <aar@pengutronix.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Koen Zandberg 2016-02-10 11:49:38 +01:00 committed by Marcel Holtmann
parent 6367551f46
commit aef00c15b8

View 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);