Commit 11005b18 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau
Browse files

mt76: mt7921s: fix a possible memory leak in mt7921_load_patch



Always release fw data at the end of mt7921_load_patch routine.

Fixes: 78b21758 ("mt76: mt7921s: fix bus hang with wrong privilege")
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent a43736cd
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -541,12 +541,8 @@ static int mt7921_load_patch(struct mt7921_dev *dev)
	if (mt76_is_sdio(&dev->mt76)) {
		/* activate again */
		ret = __mt7921_mcu_fw_pmctrl(dev);
		if (ret)
			return ret;

		if (!ret)
			ret = __mt7921_mcu_drv_pmctrl(dev);
		if (ret)
			return ret;
	}

out: