]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
um: Remove double zero check
authorShaojie Dong <quic_shaojied@quicinc.com>
Fri, 25 Oct 2024 09:02:37 +0000 (17:02 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 7 Nov 2024 16:34:03 +0000 (17:34 +0100)
free_pages() performs a parameter null check inside
therefore remove double zero check here.

Signed-off-by: Shaojie Dong <quic_shaojied@quicinc.com>
Link: https://patch.msgid.link/20241025-upstream_branch-v5-1-b8998beb2c64@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/um/kernel/skas/mmu.c

index d3fb506d5bd6084046cf5903c629432cd42b5ab3..0eb5a1d3ba70134f75d9b2af18544fca7248c6d6 100644 (file)
@@ -46,8 +46,7 @@ int init_new_context(struct task_struct *task, struct mm_struct *mm)
        return 0;
 
  out_free:
-       if (new_id->stack != 0)
-               free_pages(new_id->stack, ilog2(STUB_DATA_PAGES));
+       free_pages(new_id->stack, ilog2(STUB_DATA_PAGES));
  out:
        return ret;
 }