mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-01 16:31:34 -05:00
vga_switcheroo: comparing too few characters in strncmp()
This is a copy-and-paste bug. We should be comparing 4 characters here instead of 3. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
This commit is contained in:
parent
dfe63bb0ad
commit
fea6f330cd
1 changed files with 2 additions and 2 deletions
|
|
@ -346,11 +346,11 @@ vga_switcheroo_debugfs_write(struct file *filp, const char __user *ubuf,
|
|||
if (strncmp(usercmd, "DIS", 3) == 0)
|
||||
client_id = VGA_SWITCHEROO_DIS;
|
||||
|
||||
if (strncmp(usercmd, "MIGD", 3) == 0) {
|
||||
if (strncmp(usercmd, "MIGD", 4) == 0) {
|
||||
just_mux = true;
|
||||
client_id = VGA_SWITCHEROO_IGD;
|
||||
}
|
||||
if (strncmp(usercmd, "MDIS", 3) == 0) {
|
||||
if (strncmp(usercmd, "MDIS", 4) == 0) {
|
||||
just_mux = true;
|
||||
client_id = VGA_SWITCHEROO_DIS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue