aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/thermal/thermal_debugfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/thermal/thermal_debugfs.c b/drivers/thermal/thermal_debugfs.c
index b53881e9e0b6..c617e8b9f0dd 100644
--- a/drivers/thermal/thermal_debugfs.c
+++ b/drivers/thermal/thermal_debugfs.c
@@ -592,7 +592,7 @@ void thermal_debug_tz_trip_up(struct thermal_zone_device *tz,
if (!tz_dbg->nr_trips) {
tze = thermal_debugfs_tz_event_alloc(tz, now);
if (!tze)
- return;
+ goto unlock;
list_add(&tze->node, &tz_dbg->tz_episodes);
}
@@ -620,6 +620,7 @@ void thermal_debug_tz_trip_up(struct thermal_zone_device *tz,
(temperature - tze->trip_stats[trip_id].avg) /
tze->trip_stats[trip_id].count;
+unlock:
mutex_unlock(&thermal_dbg->lock);
}