diff options
| -rw-r--r-- | drivers/thermal/thermal_core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 5aa57736fa9e..7b723c7c4cae 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c | |||
| @@ -757,6 +757,7 @@ policy_store(struct device *dev, struct device_attribute *attr, | |||
| 757 | snprintf(name, sizeof(name), "%s", buf); | 757 | snprintf(name, sizeof(name), "%s", buf); |
| 758 | 758 | ||
| 759 | mutex_lock(&thermal_governor_lock); | 759 | mutex_lock(&thermal_governor_lock); |
| 760 | mutex_lock(&tz->lock); | ||
| 760 | 761 | ||
| 761 | gov = __find_governor(strim(name)); | 762 | gov = __find_governor(strim(name)); |
| 762 | if (!gov) | 763 | if (!gov) |
| @@ -766,6 +767,7 @@ policy_store(struct device *dev, struct device_attribute *attr, | |||
| 766 | ret = count; | 767 | ret = count; |
| 767 | 768 | ||
| 768 | exit: | 769 | exit: |
| 770 | mutex_unlock(&tz->lock); | ||
| 769 | mutex_unlock(&thermal_governor_lock); | 771 | mutex_unlock(&thermal_governor_lock); |
| 770 | return ret; | 772 | return ret; |
| 771 | } | 773 | } |
