diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2021-04-13 15:13:54 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-04-21 12:42:20 +0300 |
commit | 2b9ea5a8cf1bdc82f494da5a90191aa8b042980d (patch) | |
tree | 62aae81e3603a90e2e5564faeba438c7df1cc693 /drivers | |
parent | 06991d1f73a9bdbc5f234ee96737b9102705b89c (diff) | |
download | linux-2b9ea5a8cf1bdc82f494da5a90191aa8b042980d.tar.xz |
mt76: mt7921: add mt7921_dma_cleanup in mt7921_unregister_device
In order to avoid memory leaks, clean the dma engine unloading the
module
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7921/init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/init.c b/drivers/net/wireless/mediatek/mt76/mt7921/init.c index 5bb0a7b9e9e5..94fe2eadf285 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/init.c @@ -272,8 +272,9 @@ int mt7921_register_device(struct mt7921_dev *dev) void mt7921_unregister_device(struct mt7921_dev *dev) { mt76_unregister_device(&dev->mt76); - mt7921_mcu_exit(dev); mt7921_tx_token_put(dev); + mt7921_dma_cleanup(dev); + mt7921_mcu_exit(dev); tasklet_disable(&dev->irq_tasklet); mt76_free_device(&dev->mt76); |