Skip to content

Commit 2f9d142

Browse files
committed
thermal/core: Fix lockdep_assert() warning
The function thermal_zone_device_is_enabled() must be called with the thermal zone lock held. In the resume path, it is called without. As the thermal_zone_device_is_enabled() is also checked in thermal_zone_device_update(), do the check in resume() function is pointless, except for saving an extra initialization which does not hurt if it is done in all the cases. Fixes: ca48ad7 ("thermal/core: Move the mutex inside the thermal_zone_device_update() function") Signed-off-by: Daniel Lezcano <[email protected]> Reported-by: Marek Szyprowski <[email protected]> Tested-by: Marek Szyprowski <[email protected]>
1 parent a930da9 commit 2f9d142

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/thermal/thermal_core.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,9 +1438,6 @@ static int thermal_pm_notify(struct notifier_block *nb,
14381438
case PM_POST_SUSPEND:
14391439
atomic_set(&in_suspend, 0);
14401440
list_for_each_entry(tz, &thermal_tz_list, node) {
1441-
if (!thermal_zone_device_is_enabled(tz))
1442-
continue;
1443-
14441441
thermal_zone_device_init(tz);
14451442
thermal_zone_device_update(tz,
14461443
THERMAL_EVENT_UNSPECIFIED);

0 commit comments

Comments
 (0)