Skip to content

Commit

Permalink
wifi: mt76: mt7915: unlock on error in mt7915_thermal_temp_store()
Browse files Browse the repository at this point in the history
[ Upstream commit cdc215c ]

Drop the lock before returning -EINVAL.

Fixes: ecaccda ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
error27 authored and gregkh committed May 11, 2023
1 parent 95e41ac commit cc022a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/mediatek/mt76/mt7915/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit cc022a6

Please sign in to comment.