diff options
author | Michal Orzel <michalorzel.eng@gmail.com> | 2022-04-29 23:38:03 +0200 |
---|---|---|
committer | akpm <akpm@linux-foundation.org> | 2022-04-29 23:38:03 +0200 |
commit | 16b0b7adabfb5564a77fa35917afe08decd55b29 (patch) | |
tree | a81d8a5c850329aea68a6d2940235879b35301fb | |
parent | MAINTAINERS: remove redundant file of PTRACE SUPPORT entry (diff) | |
download | linux-16b0b7adabfb5564a77fa35917afe08decd55b29.tar.xz linux-16b0b7adabfb5564a77fa35917afe08decd55b29.zip |
kexec: remove redundant assignments
Get rid of redundant assignments which end up in values not being read
either because they are overwritten or the function ends.
Reported by clang-tidy [deadcode.DeadStores]
Link: https://lkml.kernel.org/r/20220326180948.192154-1-michalorzel.eng@gmail.com
Signed-off-by: Michal Orzel <michalorzel.eng@gmail.com>
Acked-by: Baoquan He <bhe@redhat.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Michal Orzel <michalorzel.eng@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | kernel/kexec_core.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c index 68480f731192..d08904a27362 100644 --- a/kernel/kexec_core.c +++ b/kernel/kexec_core.c @@ -768,7 +768,6 @@ static struct page *kimage_alloc_page(struct kimage *image, kimage_free_pages(old_page); continue; } - addr = old_addr; page = old_page; break; } @@ -788,7 +787,6 @@ static int kimage_load_normal_segment(struct kimage *image, unsigned char __user *buf = NULL; unsigned char *kbuf = NULL; - result = 0; if (image->file_mode) kbuf = segment->kbuf; else |