From: Li zeming <zeming@nfschina.com>
To: gor@linux.ibm.com, mark.rutland@arm.com, hca@linux.ibm.com
Cc: linux-kernel@vger.kernel.org, Li zeming <zeming@nfschina.com>
Subject: [PATCH] stackleak: Remove unnecessary ‘0’ values from ret
Date: Tue, 17 Oct 2023 14:08:24 +0800 [thread overview]
Message-ID: <20231017060824.10434-1-zeming@nfschina.com> (raw)
ret is assigned first, so it does not need to initialize the assignment.
Signed-off-by: Li zeming <zeming@nfschina.com>
---
kernel/stackleak.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/stackleak.c b/kernel/stackleak.c
index 34c9d81eea940..3faf863593846 100644
--- a/kernel/stackleak.c
+++ b/kernel/stackleak.c
@@ -24,7 +24,7 @@ static DEFINE_STATIC_KEY_FALSE(stack_erasing_bypass);
static int stack_erasing_sysctl(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
- int ret = 0;
+ int ret;
int state = !static_branch_unlikely(&stack_erasing_bypass);
int prev_state = state;
--
2.18.2
next reply other threads:[~2023-10-17 6:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-17 6:08 Li zeming [this message]
2023-10-17 10:14 ` [PATCH] stackleak: Remove unnecessary '0' " Mark Rutland
2023-10-19 0:39 ` Kees Cook
2023-11-01 4:03 ` Guenter Roeck
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=20231017060824.10434-1-zeming@nfschina.com \
--to=zeming@nfschina.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
/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
all inboxes | Powered by JetHome®