linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>
To: catalin.marinas@arm.com, akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	zhongqiu.han@oss.qualcomm.com
Subject: [PATCH 1/2] mm/kmemleak: Remove unreachable return statement in scan_should_stop()
Date: Fri, 30 Jan 2026 17:37:28 +0800	[thread overview]
Message-ID: <20260130093729.2045858-2-zhongqiu.han@oss.qualcomm.com> (raw)
In-Reply-To: <20260130093729.2045858-1-zhongqiu.han@oss.qualcomm.com>

Remove unreachable "return 0;" statement as all execution paths return
before reaching it.

No functional change.

Signed-off-by: Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>
---
 mm/kmemleak.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index fe33f2edfe07..fb0022f34393 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -1509,10 +1509,8 @@ static int scan_should_stop(void)
 	 */
 	if (current->mm)
 		return signal_pending(current);
-	else
-		return kthread_should_stop();
 
-	return 0;
+	return kthread_should_stop();
 }
 
 /*
-- 
2.43.0



  reply	other threads:[~2026-01-30  9:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-30  9:37 [PATCH 0/2] mm/kmemleak: Improve scan_should_stop() implementation Zhongqiu Han
2026-01-30  9:37 ` Zhongqiu Han [this message]
2026-02-03 17:55   ` [PATCH 1/2] mm/kmemleak: Remove unreachable return statement in scan_should_stop() Catalin Marinas
2026-01-30  9:37 ` [PATCH 2/2] mm/kmemleak: Use PF_KTHREAD flag to detect kernel threads Zhongqiu Han
2026-02-03 18:00   ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260130093729.2045858-2-zhongqiu.han@oss.qualcomm.com \
    --to=zhongqiu.han@oss.qualcomm.com \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox