Commit 6dcb3508 authored by Dan Carpenter's avatar Dan Carpenter Committed by Rafael J. Wysocki

thermal/debugfs: Unlock on error path in thermal_debug_tz_trip_up()

Add a missing mutex_unlock(&thermal_dbg->lock) to this error path.

Fixes: 7ef01f22 ("thermal/debugfs: Add thermal debugfs information for mitigation episodes")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent e95fa740
...@@ -592,7 +592,7 @@ void thermal_debug_tz_trip_up(struct thermal_zone_device *tz, ...@@ -592,7 +592,7 @@ void thermal_debug_tz_trip_up(struct thermal_zone_device *tz,
if (!tz_dbg->nr_trips) { if (!tz_dbg->nr_trips) {
tze = thermal_debugfs_tz_event_alloc(tz, now); tze = thermal_debugfs_tz_event_alloc(tz, now);
if (!tze) if (!tze)
return; goto unlock;
list_add(&tze->node, &tz_dbg->tz_episodes); list_add(&tze->node, &tz_dbg->tz_episodes);
} }
...@@ -620,6 +620,7 @@ void thermal_debug_tz_trip_up(struct thermal_zone_device *tz, ...@@ -620,6 +620,7 @@ void thermal_debug_tz_trip_up(struct thermal_zone_device *tz,
(temperature - tze->trip_stats[trip_id].avg) / (temperature - tze->trip_stats[trip_id].avg) /
tze->trip_stats[trip_id].count; tze->trip_stats[trip_id].count;
unlock:
mutex_unlock(&thermal_dbg->lock); mutex_unlock(&thermal_dbg->lock);
} }
......
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