projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dfe63bb
)
vga_switcheroo: comparing too few characters in strncmp()
author
Dan Carpenter
<error27@gmail.com>
Fri, 7 Jan 2011 05:12:27 +0000
(08:12 +0300)
committer
Dave Airlie
<airlied@redhat.com>
Fri, 7 Jan 2011 05:29:37 +0000
(15:29 +1000)
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>
drivers/gpu/vga/vga_switcheroo.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/vga/vga_switcheroo.c
b/drivers/gpu/vga/vga_switcheroo.c
index d2d8543686d38d54a33ea75caf0fda958a4176ca..e01cacba685f771f0f82a660b1e1bc21cd0b40e8 100644
(file)
--- 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,
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;
}