From: Zijun Hu Date: Mon, 7 Apr 2025 11:55:20 +0000 (+0800) Subject: fbdev: nvidiafb: Correct const string length in nvidiafb_setup() X-Git-Tag: v6.16-rc1~93^2~7 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=34fe05cd2d0f4cc625afb656469a9838f02ca59e;p=linux-block.git 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 Signed-off-by: Helge Deller --- diff --git a/drivers/video/fbdev/nvidia/nvidia.c b/drivers/video/fbdev/nvidia/nvidia.c index 8900f181f195..cfaf9454014d 100644 --- a/drivers/video/fbdev/nvidia/nvidia.c +++ b/drivers/video/fbdev/nvidia/nvidia.c @@ -1484,7 +1484,7 @@ static int nvidiafb_setup(char *options) flatpanel = 1; } else if (!strncmp(this_opt, "hwcur", 5)) { hwcur = 1; - } else if (!strncmp(this_opt, "noaccel", 6)) { + } else if (!strncmp(this_opt, "noaccel", 7)) { noaccel = 1; } else if (!strncmp(this_opt, "noscale", 7)) { noscale = 1;