Skip to content

Commit 6dcb350

Browse files
Dan Carpenterrafaeljw
authored andcommitted
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: 7ef01f2 ("thermal/debugfs: Add thermal debugfs information for mitigation episodes") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent e95fa74 commit 6dcb350

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/thermal/thermal_debugfs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ void thermal_debug_tz_trip_up(struct thermal_zone_device *tz,
592592
if (!tz_dbg->nr_trips) {
593593
tze = thermal_debugfs_tz_event_alloc(tz, now);
594594
if (!tze)
595-
return;
595+
goto unlock;
596596

597597
list_add(&tze->node, &tz_dbg->tz_episodes);
598598
}
@@ -620,6 +620,7 @@ void thermal_debug_tz_trip_up(struct thermal_zone_device *tz,
620620
(temperature - tze->trip_stats[trip_id].avg) /
621621
tze->trip_stats[trip_id].count;
622622

623+
unlock:
623624
mutex_unlock(&thermal_dbg->lock);
624625
}
625626

0 commit comments

Comments
 (0)