mt76: mt7615: fix possible memory leak in mt7615_tm_set_tx_power
authorLorenzo Bianconi <lorenzo@kernel.org>
Fri, 21 Aug 2020 09:19:51 +0000 (11:19 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 24 Sep 2020 16:10:15 +0000 (18:10 +0200)
commite862825dcf74203c5ab60335c341766808f47507
tree6629197690ad2ad84f8dc68adc1a2252422041d2
parentb496490886f919a08e946ca4cf8bdd375f54e77f
mt76: mt7615: fix possible memory leak in mt7615_tm_set_tx_power

Fix a memory leak in mt7615_tm_set_tx_power routine if
mt7615_eeprom_get_target_power_index fails.
Moreover do not account req_header twice in mcu skb allocation.

Fixes: 4f0bce1c88882 ("mt76: mt7615: implement testmode support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7615/testmode.c