Commit 861fad47 authored by Dan Carpenter's avatar Dan Carpenter Committed by Felix Fietkau

mt76: mt7915: fix a signedness bug in mt7915_mcu_apply_tx_dpd()

"idx" needs to be signed for the error handling to work.

Fixes: 495184ac ("mt76: mt7915: add support for applying pre-calibration data")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 64cf5ad3
......@@ -3448,8 +3448,9 @@ int mt7915_mcu_apply_tx_dpd(struct mt7915_phy *phy)
{
struct mt7915_dev *dev = phy->dev;
struct cfg80211_chan_def *chandef = &phy->mt76->chandef;
u16 total = 2, idx, center_freq = chandef->center_freq1;
u16 total = 2, center_freq = chandef->center_freq1;
u8 *cal = dev->cal, *eep = dev->mt76.eeprom.data;
int idx;
if (!(eep[MT_EE_DO_PRE_CAL] & MT_EE_WIFI_CAL_DPD))
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment