Commit edb94918 authored by Roel Kluin's avatar Roel Kluin Committed by Len Brown

thermal: Fix test of unsigned in thermal_cooling_device_cur_state_store()

state is unsigned long so the test did not work.
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Acked-by: default avatarZhang Rui <rui.zhang@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 13c41157
...@@ -374,7 +374,7 @@ thermal_cooling_device_cur_state_store(struct device *dev, ...@@ -374,7 +374,7 @@ thermal_cooling_device_cur_state_store(struct device *dev,
if (!sscanf(buf, "%ld\n", &state)) if (!sscanf(buf, "%ld\n", &state))
return -EINVAL; return -EINVAL;
if (state < 0) if ((long)state < 0)
return -EINVAL; return -EINVAL;
result = cdev->ops->set_cur_state(cdev, state); result = cdev->ops->set_cur_state(cdev, state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment