Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <quic_zijuhu@quicinc.com>
Signed-off-by: Helge Deller <deller@gmx.de>

authored by

Zijun Hu and committed by
Helge Deller
34fe05cd c9b26429

+1 -1
+1 -1
drivers/video/fbdev/nvidia/nvidia.c
··· 1484 1484 flatpanel = 1; 1485 1485 } else if (!strncmp(this_opt, "hwcur", 5)) { 1486 1486 hwcur = 1; 1487 - } else if (!strncmp(this_opt, "noaccel", 6)) { 1487 + } else if (!strncmp(this_opt, "noaccel", 7)) { 1488 1488 noaccel = 1; 1489 1489 } else if (!strncmp(this_opt, "noscale", 7)) { 1490 1490 noscale = 1;