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

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

authored by

Dan Carpenter and committed by
Ingo Molnar
06dd759b c305a4e9

+2 -4
+2 -4
arch/x86/kernel/module.c
··· 278 278 if (calls) { 279 279 struct callthunk_sites cs = {}; 280 280 281 - if (calls) { 282 - cs.call_start = (void *)calls->sh_addr; 283 - cs.call_end = (void *)calls->sh_addr + calls->sh_size; 284 - } 281 + cs.call_start = (void *)calls->sh_addr; 282 + cs.call_end = (void *)calls->sh_addr + calls->sh_size; 285 283 286 284 callthunks_patch_module_calls(&cs, me); 287 285 }