diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c index 8c8ce80..57c83aa 100644 --- a/drivers/thermal/thermal_sys.c +++ b/drivers/thermal/thermal_sys.c @@ -697,7 +697,9 @@ policy_show(struct device *dev, struct device_attribute *devattr, char *buf) { struct thermal_zone_device *tz = to_thermal_zone(dev); - return sprintf(buf, "%s\n", tz->governor->name); + return sprintf(buf, "%s\n", tz->governor ? (tz->governor->name ? tz->governor->name : "NULL name") : "NULL governor"); + +// return sprintf(buf, "%s\n", tz->governor->name); } static DEVICE_ATTR(type, 0444, type_show, NULL);