Loading drivers/thermal/thermal_sysfs.c +7 −1 Original line number Diff line number Diff line Loading @@ -107,12 +107,16 @@ config_show(struct device *dev, struct device_attribute *attr, char *buf) buf_offset = 0; buf1_offset = 0; buf2_offset = 0; mutex_lock(&tz->lock); list_for_each_entry(instance, &tz->thermal_instances, tz_node) { if (instance->cdev) buf_size++; } if (!buf_size) if (!buf_size) { mutex_unlock(&tz->lock); goto config_exit; } buf_size *= THERMAL_NAME_LENGTH; buf_cdev = kzalloc(buf_size, GFP_KERNEL); buf_cdev_upper = kzalloc(buf_size, GFP_KERNEL); Loading Loading @@ -153,6 +157,8 @@ config_show(struct device *dev, struct device_attribute *attr, char *buf) } } } mutex_unlock(&tz->lock); offset += scnprintf(buf + offset, PAGE_SIZE - offset, "device %s\n", buf_cdev); offset += scnprintf(buf + offset, PAGE_SIZE - offset, Loading Loading
drivers/thermal/thermal_sysfs.c +7 −1 Original line number Diff line number Diff line Loading @@ -107,12 +107,16 @@ config_show(struct device *dev, struct device_attribute *attr, char *buf) buf_offset = 0; buf1_offset = 0; buf2_offset = 0; mutex_lock(&tz->lock); list_for_each_entry(instance, &tz->thermal_instances, tz_node) { if (instance->cdev) buf_size++; } if (!buf_size) if (!buf_size) { mutex_unlock(&tz->lock); goto config_exit; } buf_size *= THERMAL_NAME_LENGTH; buf_cdev = kzalloc(buf_size, GFP_KERNEL); buf_cdev_upper = kzalloc(buf_size, GFP_KERNEL); Loading Loading @@ -153,6 +157,8 @@ config_show(struct device *dev, struct device_attribute *attr, char *buf) } } } mutex_unlock(&tz->lock); offset += scnprintf(buf + offset, PAGE_SIZE - offset, "device %s\n", buf_cdev); offset += scnprintf(buf + offset, PAGE_SIZE - offset, Loading