Return a stable trend when trend is queried during boot before
all the pointers are initialized.
Bug
200311672
Change-Id: I6b03b266b868ac1bd6e39ea63078d24e273bc327
Signed-off-by: Srikar Srimath Tirumala <srikars@nvidia.com>
Reviewed-on: http://git-master/r/
1488401
(cherry picked from commit
f507b9b74fede1e1adac02c295e0f3666c4a7674)
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/
1492084
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
int ret, temp, trip_temp, last_temp;
struct nct1008_data *nct_data = (struct nct1008_data *)data;
struct thermal_zone_device *thz = nct_data->sensors[sensor].thz;
+ *trend = THERMAL_TREND_STABLE;
+
+ if (!thz)
+ return 0;
ret = thz->ops->get_trip_temp(thz, trip, &trip_temp);
if (ret)