Checking return value of update_temperature.
If return value is not Zero, it does't handle thermal trips.
Bug
200011588
Bug
200015248
Change-Id: I084e7c53ee132b33fa377d96f6c9e70f26529ffe
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/428636
(cherry picked from commit
d7254186c9a2a6aeaf360d853c332a33ef9f0ff8)
Reviewed-on: http://git-master/r/436688
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
}
EXPORT_SYMBOL_GPL(thermal_zone_get_temp);
-static void update_temperature(struct thermal_zone_device *tz)
+static int update_temperature(struct thermal_zone_device *tz)
{
long temp;
int ret;
if (ret) {
dev_warn(&tz->device, "failed to read out thermal zone %d\n",
tz->id);
- return;
+ return ret;
}
mutex_lock(&tz->lock);
tz->last_temperature = tz->temperature;
tz->temperature = temp;
mutex_unlock(&tz->lock);
+
+ return 0;
}
void thermal_zone_device_update(struct thermal_zone_device *tz)
if (!tz || !tz->ops->get_temp || !device_is_registered(&tz->device))
return;
- update_temperature(tz);
+ if (update_temperature(tz))
+ return;
for (count = 0; count < tz->trips; count++)
handle_thermal_trip(tz, count);