This is a note to let you know that I've just added the patch titled wifi: mt76: mt7915: unlock on error in mt7915_thermal_temp_store() to the 6.2-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: wifi-mt76-mt7915-unlock-on-error-in-mt7915_thermal_t.patch and it can be found in the queue-6.2 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 729413fd1651a4341cd187b02b6a8e5b5091befd Author: Dan Carpenter <error27@xxxxxxxxx> Date: Thu Feb 16 15:15:05 2023 +0300 wifi: mt76: mt7915: unlock on error in mt7915_thermal_temp_store() [ Upstream commit cdc215c2c8d74b3c8886650e979b47f16c1f7f92 ] Drop the lock before returning -EINVAL. Fixes: ecaccdae7a7e ("wifi: mt76: mt7915: rework mt7915_thermal_temp_store()") Signed-off-by: Dan Carpenter <error27@xxxxxxxxx> Acked-by: Lorenzo Bianconi <lorenzo@xxxxxxxxxx> Signed-off-by: Felix Fietkau <nbd@xxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c index a80ae31e7abff..916d6c7c569d3 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c @@ -90,6 +90,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; }