diff options
author | Shaojie Dong <quic_shaojied@quicinc.com> | 2024-10-25 17:02:37 +0800 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-11-07 17:34:03 +0100 |
commit | 0b0ad2541d8e465c82b69202bbc2b1efcac6b73d (patch) | |
tree | 6534edab3f0ff04983688fd250b8df54fa861ff8 /arch/um | |
parent | d3b08e5f3f2829943342b88d3e2b44fb0ccdccab (diff) |
um: Remove double zero check
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>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/kernel/skas/mmu.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c index d3fb506d5bd6..0eb5a1d3ba70 100644 --- a/arch/um/kernel/skas/mmu.c +++ b/arch/um/kernel/skas/mmu.c @@ -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; } |