aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Orzel <[email protected]>2022-04-29 14:38:03 -0700
committerakpm <[email protected]>2022-04-29 14:38:03 -0700
commit16b0b7adabfb5564a77fa35917afe08decd55b29 (patch)
treea81d8a5c850329aea68a6d2940235879b35301fb
parentf224cabeedb274db8e64824a50765e2eabacca90 (diff)
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/[email protected] Signed-off-by: Michal Orzel <[email protected]> Acked-by: Baoquan He <[email protected]> Cc: Eric Biederman <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Nick Desaulniers <[email protected]> Cc: Michal Orzel <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r--kernel/kexec_core.c2
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