mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt7615: check return value of mt7615_eeprom_get_power_index
mt7615_eeprom_get_power_index can return negative error value. Check mt7615_eeprom_get_power_index return value before using it Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
4ef1957cea
commit
f25a43cc53
@@ -253,6 +253,9 @@ void mt7615_init_txpower(struct mt7615_dev *dev,
|
||||
int index;
|
||||
|
||||
index = mt7615_eeprom_get_power_index(dev, chan, j);
|
||||
if (index < 0)
|
||||
continue;
|
||||
|
||||
target_power = max(target_power, eep[index]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user