Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2016e4a0 authored by David Woodhouse's avatar David Woodhouse
Browse files

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

parent ce326329
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;