diff options
author | Ingo Molnar <mingo@kernel.org> | 2025-03-04 11:23:48 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2025-03-04 20:29:35 +0100 |
commit | 71c2ff150f34904f693c654ee8c55c996629abb7 (patch) | |
tree | 9ae0281cc2069b564ddebf73400f5f90312868ca /arch/x86/kernel/cpu/mtrr/if.c | |
parent | 1fff9f8730b00c39ec5055656e45ef69acd9409a (diff) | |
parent | c8b584fe82d0f1e478a598f954943b095a4a8f5c (diff) |
Merge branch 'x86/asm' into x86/core, to pick up dependent commits
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/cpu/mtrr/if.c')
-rw-r--r-- | arch/x86/kernel/cpu/mtrr/if.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/mtrr/if.c b/arch/x86/kernel/cpu/mtrr/if.c index a5c506f6da7f..4049235b1bfe 100644 --- a/arch/x86/kernel/cpu/mtrr/if.c +++ b/arch/x86/kernel/cpu/mtrr/if.c @@ -99,7 +99,6 @@ mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t * ppos) char *ptr; char line[LINE_SIZE]; int length; - size_t linelen; memset(line, 0, LINE_SIZE); @@ -108,9 +107,8 @@ mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t * ppos) if (length < 0) return length; - linelen = strlen(line); - ptr = line + linelen - 1; - if (linelen && *ptr == '\n') + ptr = line + length - 1; + if (length && *ptr == '\n') *ptr = '\0'; if (!strncmp(line, "disable=", 8)) { |