mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
wifi: mt76: mt7915: fix memory leak in mt7915_mcu_exit
[ Upstream commit49bd78282e] Always purge mcu skb queues in mt7915_mcu_exit routine even if mt7915_firmware_state fails. Fixes:e57b790146("mt76: add mac80211 driver for MT7915 PCIe-based chipsets") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
32e1e8b25d
commit
4cbb876153
@@ -2299,13 +2299,14 @@ void mt7915_mcu_exit(struct mt7915_dev *dev)
|
||||
__mt76_mcu_restart(&dev->mt76);
|
||||
if (mt7915_firmware_state(dev, false)) {
|
||||
dev_err(dev->mt76.dev, "Failed to exit mcu\n");
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
|
||||
mt76_wr(dev, MT_TOP_LPCR_HOST_BAND(0), MT_TOP_LPCR_HOST_FW_OWN);
|
||||
if (dev->hif2)
|
||||
mt76_wr(dev, MT_TOP_LPCR_HOST_BAND(1),
|
||||
MT_TOP_LPCR_HOST_FW_OWN);
|
||||
out:
|
||||
skb_queue_purge(&dev->mt76.mcu.res_q);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user