summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/thermal/thermal_core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 90e38cc199f4..64de09861c05 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -553,7 +553,8 @@ void thermal_zone_device_update(struct thermal_zone_device *tz,
if (atomic_read(&in_suspend))
return;
- if (!tz->ops->get_temp)
+ if (WARN_ONCE(!tz->ops->get_temp, "'%s' must not be called without "
+ "'get_temp' ops set\n", __func__))
return;
update_temperature(tz);