Commit 3f7dda36 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau
Browse files

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: 52546e27 ("wifi: mt76: add WED RX support to dma queue alloc")
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 1b88b47e
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -960,7 +960,6 @@ void mt76_dma_cleanup(struct mt76_dev *dev)
		struct mt76_queue *q = &dev->q_rx[i];
		struct mt76_queue *q = &dev->q_rx[i];


		netif_napi_del(&dev->napi[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);
	}
	}