diff options
| author | Ajith P V <ajithpv.linux@gmail.com> | 2026-08-18 11:17:22 +0000 |
|---|---|---|
| committer | Helge Deller <deller@gmx.de> | 2026-08-20 23:45:07 +0200 |
| commit | f74cf70e5e78a43bd316e5c8e371caea0a49c207 (patch) | |
| tree | 201d47d3a41893056bdbbedbec9d0a603a15e48e /drivers/video/fbdev | |
| parent | ba13226fc966004713aed47931db8922b84d1960 (diff) | |
fbdev: viafb: refactor strcpy and viafb_name
Eliminate the single-use file-scope variable `viafb_name` and pass the
"Via" string literal directly to strcpy().
Since "Via" is a literal constant, the compiler safely executes
compile-time bounds checking during fortify verification. This satisfies
the security initiative requirements while minimizing code complexity.
Signed-off-by: Ajith P V <ajithpv.linux@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/video/fbdev')
| -rw-r--r-- | drivers/video/fbdev/via/viafbdev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/video/fbdev/via/viafbdev.c b/drivers/video/fbdev/via/viafbdev.c index 80f95dac32c8..dd9374e8ad09 100644 --- a/drivers/video/fbdev/via/viafbdev.c +++ b/drivers/video/fbdev/via/viafbdev.c @@ -16,7 +16,6 @@ #define _MASTER_FILE #include "global.h" -static char *viafb_name = "Via"; static u32 pseudo_pal[17]; /* video mode */ @@ -144,7 +143,7 @@ static void viafb_setup_fixinfo(struct fb_fix_screeninfo *fix, struct viafb_par *viaparinfo) { memset(fix, 0, sizeof(struct fb_fix_screeninfo)); - strcpy(fix->id, viafb_name); + strcpy(fix->id, "Via"); fix->smem_start = viaparinfo->fbmem; fix->smem_len = viaparinfo->fbmem_free; |
