mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 01:49:36 +00:00
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: Roel Kluin <roel.kluin@gmail.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
13c4115709
commit
edb9491852
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue