From: Shaojie Dong Date: Fri, 25 Oct 2024 09:02:37 +0000 (+0800) Subject: um: Remove double zero check X-Git-Tag: v6.13-rc1~18^2~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0b0ad2541d8e465c82b69202bbc2b1efcac6b73d;p=thirdparty%2Fkernel%2Flinux.git um: Remove double zero check free_pages() performs a parameter null check inside therefore remove double zero check here. Signed-off-by: Shaojie Dong Link: https://patch.msgid.link/20241025-upstream_branch-v5-1-b8998beb2c64@quicinc.com Signed-off-by: Johannes Berg --- diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c index d3fb506d5bd60..0eb5a1d3ba701 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; }