Commit cdc215c2 authored by Dan Carpenter's avatar Dan Carpenter Committed by Felix Fietkau

wifi: mt76: mt7915: unlock on error in mt7915_thermal_temp_store()

Drop the lock before returning -EINVAL.

Fixes: ecaccdae ("wifi: mt76: mt7915: rework mt7915_thermal_temp_store()")
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Acked-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent df5e5bfd
...@@ -89,6 +89,7 @@ static ssize_t mt7915_thermal_temp_store(struct device *dev, ...@@ -89,6 +89,7 @@ static ssize_t mt7915_thermal_temp_store(struct device *dev,
val < phy->throttle_temp[MT7915_CRIT_TEMP_IDX])) { val < phy->throttle_temp[MT7915_CRIT_TEMP_IDX])) {
dev_err(phy->dev->mt76.dev, dev_err(phy->dev->mt76.dev,
"temp1_max shall be greater than temp1_crit."); "temp1_max shall be greater than temp1_crit.");
mutex_unlock(&phy->dev->mt76.mutex);
return -EINVAL; return -EINVAL;
} }
......
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