diff options
| -rw-r--r-- | drivers/thermal/thermal_sys.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c index fab970d9e3e1..022bacb71a7e 100644 --- a/drivers/thermal/thermal_sys.c +++ b/drivers/thermal/thermal_sys.c | |||
| @@ -150,9 +150,9 @@ mode_store(struct device *dev, struct device_attribute *attr, | |||
| 150 | if (!tz->ops->set_mode) | 150 | if (!tz->ops->set_mode) |
| 151 | return -EPERM; | 151 | return -EPERM; |
| 152 | 152 | ||
| 153 | if (!strncmp(buf, "enabled", sizeof("enabled"))) | 153 | if (!strncmp(buf, "enabled", sizeof("enabled") - 1)) |
| 154 | result = tz->ops->set_mode(tz, THERMAL_DEVICE_ENABLED); | 154 | result = tz->ops->set_mode(tz, THERMAL_DEVICE_ENABLED); |
| 155 | else if (!strncmp(buf, "disabled", sizeof("disabled"))) | 155 | else if (!strncmp(buf, "disabled", sizeof("disabled") - 1)) |
| 156 | result = tz->ops->set_mode(tz, THERMAL_DEVICE_DISABLED); | 156 | result = tz->ops->set_mode(tz, THERMAL_DEVICE_DISABLED); |
| 157 | else | 157 | else |
| 158 | result = -EINVAL; | 158 | result = -EINVAL; |
