提交 2016e4a0 编写于 作者: D David Woodhouse

ideapad: Only allow camera state to be set to 0 or 1

Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 ce326329
......@@ -140,7 +140,7 @@ static ssize_t store_ideapad_cam(struct device *dev,
return 0;
if (sscanf(buf, "%i", &state) != 1)
return -EINVAL;
ret = ideapad_dev_set_state(IDEAPAD_DEV_CAMERA, state);
ret = ideapad_dev_set_state(IDEAPAD_DEV_CAMERA, !!state);
if (ret < 0)
return ret;
return count;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册