wifi: mt76: dma: fix memory leak running mt76_dma_tx_cleanup
authorLorenzo Bianconi <lorenzo@kernel.org>
Sun, 1 Jan 2023 11:50:05 +0000 (12:50 +0100)
committerFelix Fietkau <nbd@nbd.name>
Fri, 3 Feb 2023 13:47:16 +0000 (14:47 +0100)
Fix device unregister memory leak and alway cleanup all configured
rx queues in mt76_dma_tx_cleanup routine.

Fixes: 52546e27787e ("wifi: mt76: add WED RX support to dma queue alloc")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/dma.c

index 805684f..d29cb6c 100644 (file)
@@ -960,8 +960,7 @@ void mt76_dma_cleanup(struct mt76_dev *dev)
                struct mt76_queue *q = &dev->q_rx[i];
 
                netif_napi_del(&dev->napi[i]);
-               if (FIELD_GET(MT_QFLAG_WED_TYPE, q->flags))
-                       mt76_dma_rx_cleanup(dev, q);
+               mt76_dma_rx_cleanup(dev, q);
        }
 
        mt76_free_pending_txwi(dev);