From 0c750cf08f85b062d2d851c57d9045f3f70378c7 Mon Sep 17 00:00:00 2001 From: Lorenzo Bianconi Date: Sun, 1 Jan 2023 12:50:05 +0100 Subject: [PATCH] wifi: mt76: dma: fix memory leak running mt76_dma_tx_cleanup 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 Signed-off-by: Felix Fietkau --- dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dma.c b/dma.c index 46d3f73f..e9303e55 100644 --- a/dma.c +++ b/dma.c @@ -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);