aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/vga
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2011-01-07 00:12:27 -0500
committerDave Airlie <airlied@redhat.com>2011-01-07 00:29:37 -0500
commitfea6f330cdd18f79d50bcdfbedb96d929a173e0d (patch)
tree9ea6e24eb96ea58b1db44b2e6c942278b2305aec /drivers/gpu/vga
parentdfe63bb0ad9810db13aab0058caba97866e0a681 (diff)
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 <error27@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/vga')
-rw-r--r--drivers/gpu/vga/vga_switcheroo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c
index d2d8543686d3..e01cacba685f 100644
--- a/drivers/gpu/vga/vga_switcheroo.c
+++ b/drivers/gpu/vga/vga_switcheroo.c
@@ -346,11 +346,11 @@ vga_switcheroo_debugfs_write(struct file *filp, const char __user *ubuf,
346 if (strncmp(usercmd, "DIS", 3) == 0) 346 if (strncmp(usercmd, "DIS", 3) == 0)
347 client_id = VGA_SWITCHEROO_DIS; 347 client_id = VGA_SWITCHEROO_DIS;
348 348
349 if (strncmp(usercmd, "MIGD", 3) == 0) { 349 if (strncmp(usercmd, "MIGD", 4) == 0) {
350 just_mux = true; 350 just_mux = true;
351 client_id = VGA_SWITCHEROO_IGD; 351 client_id = VGA_SWITCHEROO_IGD;
352 } 352 }
353 if (strncmp(usercmd, "MDIS", 3) == 0) { 353 if (strncmp(usercmd, "MDIS", 4) == 0) {
354 just_mux = true; 354 just_mux = true;
355 client_id = VGA_SWITCHEROO_DIS; 355 client_id = VGA_SWITCHEROO_DIS;
356 } 356 }