diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-04-07 16:06:23 +0200 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-04-08 12:30:31 +0200 |
| commit | 323803ac63209f9709c988011caa62b014993219 (patch) | |
| tree | 1e0d4da0f85f32a8ce2a172b1744aff84507b6a8 /net/ipv4/ipvs/git@git.tavy.me:linux.git | |
| parent | daae9c18feec74566e023fc88cfb0ce26e39d868 (diff) | |
thermal: core: Drop redundant check from thermal_zone_device_update()
Since __thermal_zone_device_update() checks if tz->state is
TZ_STATE_READY and bails out immediately otherwise, it is not
necessary to check the thermal_zone_is_present() return value in
thermal_zone_device_update(). Namely, tz->state is equal to
TZ_STATE_FLAG_INIT initially and that flag is only cleared in
thermal_zone_init_complete() after adding tz to the list of thermal
zones, and thermal_zone_exit() sets TZ_STATE_FLAG_EXIT in tz->state
while removing tz from that list. Thus tz->state is not TZ_STATE_READY
when tz is not in the list and the check mentioned above is redundant.
Accordingly, drop the redundant thermal_zone_is_present() check from
thermal_zone_device_update() and drop the former altogether because it
has no more users.
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/3406806.aeNJFYEL58@rafael.j.wysocki
Diffstat (limited to 'net/ipv4/ipvs/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
