From 4994946a295b98d2f517f37cdf8d5c386e8700ce Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 3 Mar 2016 22:05:07 +0100 Subject: [PATCH] mt7603: fix cleanup order Signed-off-by: Felix Fietkau --- mac80211.c | 2 +- mt7603_init.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mac80211.c b/mac80211.c index dcd47ecd..7cca6857 100644 --- a/mac80211.c +++ b/mac80211.c @@ -218,8 +218,8 @@ void mt76_unregister_device(struct mt76_dev *dev) { struct ieee80211_hw *hw = dev->hw; - mt76_tx_free(dev); ieee80211_unregister_hw(hw); + mt76_tx_free(dev); } EXPORT_SYMBOL_GPL(mt76_unregister_device); diff --git a/mt7603_init.c b/mt7603_init.c index 9a44d7e4..985cf024 100644 --- a/mt7603_init.c +++ b/mt7603_init.c @@ -383,8 +383,8 @@ int mt7603_register_device(struct mt7603_dev *dev) void mt7603_unregister_device(struct mt7603_dev *dev) { - mt7603_mac_status_skb(dev, NULL, -1); mt76_unregister_device(&dev->mt76); + mt7603_mac_status_skb(dev, NULL, -1); mt7603_mcu_exit(dev); mt7603_dma_cleanup(dev); ieee80211_free_hw(mt76_hw(dev));