diff mbox series

um: Remove double zero check

Message ID 20241029-b4_branch-v1-1-edeabe23b355@quicinc.com (mailing list archive)
State Not Applicable
Headers show
Series um: Remove double zero check | expand

Commit Message

Shaojie Dong Oct. 29, 2024, 12:29 p.m. UTC
free_pages() performs a parameter null check inside
therefore remove double zero check here.

Signed-off-by: Shaojie Dong <quic_shaojied@quicinc.com>
---
 arch/um/kernel/skas/mmu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)


---
base-commit: dec9255a128e19c5fcc3bdb18175d78094cc624d
change-id: 20241029-b4_branch-0c4185f6a509

Best regards,

Comments

Alexey Klimov Oct. 29, 2024, 2:13 p.m. UTC | #1
On Tue Oct 29, 2024 at 12:29 PM GMT, Shaojie Dong wrote:
> free_pages() performs a parameter null check inside
> therefore remove double zero check here.
>
> Signed-off-by: Shaojie Dong <quic_shaojied@quicinc.com>
> ---
>  arch/um/kernel/skas/mmu.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

It doesn't seem that linux-msm is the right destination for this change.
You can use scripts/get_maintainer.pl script to figure out where to send
a patch.

HTH.

Best regards,
Alexey
diff mbox series

Patch

diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c
index d3fb506d5bd6084046cf5903c629432cd42b5ab3..0eb5a1d3ba70134f75d9b2af18544fca7248c6d6 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;
 }