thermal: trip: Drop redundant trips check from for_each_thermal_trip()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 19 Sep 2023 18:59:53 +0000 (20:59 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 26 Sep 2023 15:59:53 +0000 (17:59 +0200)
commita15ffa783ea4210877886c59566a0d20f6b2bc09
tree9761e6265af25f5f910df0a2908bb84ad94384b0
parent950210887670cbb7d2eb9af6fb743b70f1a1ebdc
thermal: trip: Drop redundant trips check from for_each_thermal_trip()

It is invalid to call for_each_thermal_trip() on an unregistered thermal
zone anyway, and as per thermal_zone_device_register_with_trips(), the
trips[] table must be present if num_trips is greater than zero for the
given thermal zone.

Hence, the trips check in for_each_thermal_trip() is redundant and so it
can be dropped.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/thermal_trip.c