summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt7915
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2023-02-16 15:15:05 +0300
committerFelix Fietkau <nbd@nbd.name>2023-04-17 15:34:34 +0200
commitcdc215c2c8d74b3c8886650e979b47f16c1f7f92 (patch)
tree43c1c5037aef8613db5345a3951e7e5b1844bb38 /drivers/net/wireless/mediatek/mt76/mt7915
parentdf5e5bfdb1d52c5524f21e34488a37f3fe2badad (diff)
downloadlinux-stable-cdc215c2c8d74b3c8886650e979b47f16c1f7f92.tar.gz
linux-stable-cdc215c2c8d74b3c8886650e979b47f16c1f7f92.tar.bz2
linux-stable-cdc215c2c8d74b3c8886650e979b47f16c1f7f92.zip
wifi: mt76: mt7915: unlock on error in mt7915_thermal_temp_store()
Drop the lock before returning -EINVAL. Fixes: ecaccdae7a7e ("wifi: mt76: mt7915: rework mt7915_thermal_temp_store()") Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7915')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7915/init.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
index 5e288116b1b0..4f3efc942a4d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
@@ -89,6 +89,7 @@ static ssize_t mt7915_thermal_temp_store(struct device *dev,
val < phy->throttle_temp[MT7915_CRIT_TEMP_IDX])) {
dev_err(phy->dev->mt76.dev,
"temp1_max shall be greater than temp1_crit.");
+ mutex_unlock(&phy->dev->mt76.mutex);
return -EINVAL;
}