Skip to content

Commit

Permalink
thermal: trip: Drop a redundant check from thermal_zone_set_trip()
Browse files Browse the repository at this point in the history
After recent changes in the thermal framework, a trip points array is
required for registering a thermal zone that is not tripless, so the
tz->trips pointer in thermal_zone_set_trip() is never NULL and the
check involving it is redundant.  Drop that check.

No functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
  • Loading branch information
Rafael J. Wysocki committed Nov 30, 2023
1 parent 401888e commit 5973024
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/thermal/thermal_trip.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,6 @@ int thermal_zone_set_trip(struct thermal_zone_device *tz, int trip_id,
struct thermal_trip t;
int ret;

if (!tz->ops->set_trip_temp && !tz->ops->set_trip_hyst && !tz->trips)
return -EINVAL;

ret = __thermal_zone_get_trip(tz, trip_id, &t);
if (ret)
return ret;
Expand Down

0 comments on commit 5973024

Please sign in to comment.