aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/thermal_sys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 3bc72ea57e09..5066de5cfc0c 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -377,7 +377,7 @@ thermal_cooling_device_cur_state_store(struct device *dev,
377 if (!sscanf(buf, "%ld\n", &state)) 377 if (!sscanf(buf, "%ld\n", &state))
378 return -EINVAL; 378 return -EINVAL;
379 379
380 if (state < 0) 380 if ((long)state < 0)
381 return -EINVAL; 381 return -EINVAL;
382 382
383 result = cdev->ops->set_cur_state(cdev, state); 383 result = cdev->ops->set_cur_state(cdev, state);