|
@@ -1530,6 +1530,9 @@ struct thermal_zone_device *thermal_zone_device_register(const char *type,
|
|
|
if (!ops || !ops->get_temp)
|
|
if (!ops || !ops->get_temp)
|
|
|
return ERR_PTR(-EINVAL);
|
|
return ERR_PTR(-EINVAL);
|
|
|
|
|
|
|
|
|
|
+ if (trips > 0 && !ops->get_trip_type)
|
|
|
|
|
+ return ERR_PTR(-EINVAL);
|
|
|
|
|
+
|
|
|
tz = kzalloc(sizeof(struct thermal_zone_device), GFP_KERNEL);
|
|
tz = kzalloc(sizeof(struct thermal_zone_device), GFP_KERNEL);
|
|
|
if (!tz)
|
|
if (!tz)
|
|
|
return ERR_PTR(-ENOMEM);
|
|
return ERR_PTR(-ENOMEM);
|