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>
This commit is contained in:
Shaojie Dong 2024-10-25 17:02:37 +08:00 committed by Johannes Berg
parent d3b08e5f3f
commit 0b0ad2541d

View 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;
}