summaryrefslogtreecommitdiff
path: root/mm/sparse.c
diff options
context:
space:
mode:
authorLi zeming <zeming@nfschina.com>2023-04-22 00:47:33 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-04-22 00:52:05 +0300
commitf0ca8c25256dd22737db5780e33e2809ce297625 (patch)
tree3f3c86e3327cd0648b05503f36f1b7e43fc78bac /mm/sparse.c
parent6b008640db7355d8de6ac18f74cedd7ccc92684f (diff)
downloadlinux-f0ca8c25256dd22737db5780e33e2809ce297625.tar.xz
sparse: remove unnecessary 0 values from rc
rc is assigned first, so it does not need to initialize the assignment. Link: https://lkml.kernel.org/r/20230421214733.2909-1-zeming@nfschina.com Signed-off-by: Li zeming <zeming@nfschina.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/sparse.c')
-rw-r--r--mm/sparse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/sparse.c b/mm/sparse.c
index fb7aeb1899a4..c2afdb26039e 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -832,7 +832,7 @@ static struct page * __meminit section_activate(int nid, unsigned long pfn,
struct mem_section *ms = __pfn_to_section(pfn);
struct mem_section_usage *usage = NULL;
struct page *memmap;
- int rc = 0;
+ int rc;
if (!ms->usage) {
usage = kzalloc(mem_section_usage_size(), GFP_KERNEL);