Loading drivers/thermal/thermal_debugfs.c +2 −0 Original line number Diff line number Diff line Loading @@ -150,6 +150,8 @@ static int parse_threshold(struct thermal_zone_device *tz, char *buf_ptr, int ret; trip_buf = strnstr(buf, "trip", count); if (!trip_buf) return -EINVAL; trip_buf_end = strnchr(trip_buf, buf_ptr + count - trip_buf, '\n'); if (!trip_buf_end) return -EINVAL; Loading drivers/thermal/thermal_sysfs.c +6 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,12 @@ config_show(struct device *dev, struct device_attribute *attr, char *buf) buf_temp = kzalloc(buf_size, GFP_KERNEL); buf_hyst = kzalloc(buf_size, GFP_KERNEL); buf_trip = kzalloc(buf_size, GFP_KERNEL); if (!buf_trip || !buf_hyst || !buf_temp) { kfree(buf_temp); kfree(buf_hyst); kfree(buf_trip); return -ENOMEM; } for (i = 0; i < tz->trips; i++) { buf_offset = scnprintf(buf_trip + buf_offset, buf_size - buf_offset, "%d ", i); Loading Loading
drivers/thermal/thermal_debugfs.c +2 −0 Original line number Diff line number Diff line Loading @@ -150,6 +150,8 @@ static int parse_threshold(struct thermal_zone_device *tz, char *buf_ptr, int ret; trip_buf = strnstr(buf, "trip", count); if (!trip_buf) return -EINVAL; trip_buf_end = strnchr(trip_buf, buf_ptr + count - trip_buf, '\n'); if (!trip_buf_end) return -EINVAL; Loading
drivers/thermal/thermal_sysfs.c +6 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,12 @@ config_show(struct device *dev, struct device_attribute *attr, char *buf) buf_temp = kzalloc(buf_size, GFP_KERNEL); buf_hyst = kzalloc(buf_size, GFP_KERNEL); buf_trip = kzalloc(buf_size, GFP_KERNEL); if (!buf_trip || !buf_hyst || !buf_temp) { kfree(buf_temp); kfree(buf_hyst); kfree(buf_trip); return -ENOMEM; } for (i = 0; i < tz->trips; i++) { buf_offset = scnprintf(buf_trip + buf_offset, buf_size - buf_offset, "%d ", i); Loading