提交 edb94918 编写于 作者: R Roel Kluin 提交者: 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: NRoel Kluin <roel.kluin@gmail.com>
Acked-by: NZhang Rui <rui.zhang@intel.com>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 13c41157
......@@ -374,7 +374,7 @@ thermal_cooling_device_cur_state_store(struct device *dev,
if (!sscanf(buf, "%ld\n", &state))
return -EINVAL;
if (state < 0)
if ((long)state < 0)
return -EINVAL;
result = cdev->ops->set_cur_state(cdev, state);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册