sparse: remove unnecessary 0 values from rc
authorLi zeming <zeming@nfschina.com>
Fri, 21 Apr 2023 21:47:33 +0000 (05:47 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 21 Apr 2023 21:52:05 +0000 (14:52 -0700)
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>
mm/sparse.c

index fb7aeb1899a45c58c094350f6eb20d90c857d301..c2afdb26039e58a9edc6a323304a7f5bb513d26f 100644 (file)
@@ -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);