Checking thermal zone device whether it is registered or not.
Bug
200011588
Change-Id: I377583f887d3dbe8258daa46d777daa6337b192f
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/424088
(cherry picked from commit
397ce28d1841853103bc028080dfb00656211b9e)
Reviewed-on: http://git-master/r/427501
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
enum thermal_trip_type type;
#endif
- if (!tz || IS_ERR(tz) || !tz->ops->get_temp)
+ if (!tz || IS_ERR(tz) || !tz->ops->get_temp ||
+ !device_is_registered(&tz->device))
goto exit;
mutex_lock(&tz->lock);
{
int count;
- if (!tz->ops->get_temp)
+ if (!tz || !tz->ops->get_temp || !device_is_registered(&tz->device))
return;
update_temperature(tz);