Commit 2016e4a0a1c49b68c9d820e28dadab7080c45d1b
1 parent
ce326329d7
Exists in
master
and in
7 other branches
ideapad: Only allow camera state to be set to 0 or 1
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
drivers/platform/x86/ideapad_acpi.c
... | ... | @@ -140,7 +140,7 @@ |
140 | 140 | return 0; |
141 | 141 | if (sscanf(buf, "%i", &state) != 1) |
142 | 142 | return -EINVAL; |
143 | - ret = ideapad_dev_set_state(IDEAPAD_DEV_CAMERA, state); | |
143 | + ret = ideapad_dev_set_state(IDEAPAD_DEV_CAMERA, !!state); | |
144 | 144 | if (ret < 0) |
145 | 145 | return ret; |
146 | 146 | return count; |