diff options
| author | Dan Carpenter <dan.carpenter@linaro.org> | 2025-02-19 16:48:49 +0300 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2025-02-21 14:27:42 +0100 |
| commit | 06dd759b68eea200e488cafbcfd382208a940777 (patch) | |
| tree | 3910f999be9d004dcb439c171d15cc8a9ac15d98 /arch/x86/kernel/module.c | |
| parent | x86: Move sysctls into arch/x86 (diff) | |
| download | linux-06dd759b68eea200e488cafbcfd382208a940777.tar.gz linux-06dd759b68eea200e488cafbcfd382208a940777.zip | |
x86/module: Remove unnecessary check in module_finalize()
The "calls" pointer can no longer be NULL after the following
commit:
ab9fea59487d ("x86/alternative: Simplify callthunk patching")
Delete this unnecessary check.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/fcbb2f57-0714-4139-b441-8817365c16a1@stanley.mountain
Diffstat (limited to 'arch/x86/kernel/module.c')
| -rw-r--r-- | arch/x86/kernel/module.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c index cb9d295e67cb..615f74c4bd6c 100644 --- a/arch/x86/kernel/module.c +++ b/arch/x86/kernel/module.c @@ -278,10 +278,8 @@ int module_finalize(const Elf_Ehdr *hdr, if (calls) { struct callthunk_sites cs = {}; - if (calls) { - cs.call_start = (void *)calls->sh_addr; - cs.call_end = (void *)calls->sh_addr + calls->sh_size; - } + cs.call_start = (void *)calls->sh_addr; + cs.call_end = (void *)calls->sh_addr + calls->sh_size; callthunks_patch_module_calls(&cs, me); } |
