Skip to content

Commit 34fe05c

Browse files
zijun-huhdeller
authored andcommitted
fbdev: nvidiafb: Correct const string length in nvidiafb_setup()
The actual length of const string "noaccel" is 7, but the strncmp() branch in nvidiafb_setup() wrongly hard codes it as 6. Fix by using actual length 7 as argument of the strncmp(). Signed-off-by: Zijun Hu <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent c9b2642 commit 34fe05c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/video/fbdev/nvidia/nvidia.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1484,7 +1484,7 @@ static int nvidiafb_setup(char *options)
14841484
flatpanel = 1;
14851485
} else if (!strncmp(this_opt, "hwcur", 5)) {
14861486
hwcur = 1;
1487-
} else if (!strncmp(this_opt, "noaccel", 6)) {
1487+
} else if (!strncmp(this_opt, "noaccel", 7)) {
14881488
noaccel = 1;
14891489
} else if (!strncmp(this_opt, "noscale", 7)) {
14901490
noscale = 1;

0 commit comments

Comments
 (0)