From: ZhouJie <zhoujie@nfschina.com>
To: mcgrof@kernel.org
Cc: linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org,
ZhouJie <zhoujie@nfschina.com>
Subject: [PATCH] module: main: Remove unnecessary ‘0’ values from err
Date: Fri, 20 Oct 2023 16:27:27 +0800 [thread overview]
Message-ID: <20231020082727.10659-1-zhoujie@nfschina.com> (raw)
Remove redundant assignment .The variable 'err' was assigned a value
before its usage, making the initial assignment unnecessary. This commit
removes the redundant assignment, improving code clarity and efficiency.
Signed-off-by: ZhouJie <zhoujie@nfschina.com>
---
kernel/module/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/module/main.c b/kernel/module/main.c
index 98fedfdb8db52..a3c036eb7bcdb 100644
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -2830,7 +2830,7 @@ static int load_module(struct load_info *info, const char __user *uargs,
{
struct module *mod;
bool module_allocated = false;
- long err = 0;
+ long err;
char *after_dashes;
/*
--
2.18.2
next reply other threads:[~2023-10-20 8:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 8:27 ZhouJie [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-12-23 8:32 [PATCH] module: main: remove unnecessary ‘0’ values from err Li kunyu
2022-12-23 15:03 ` Luis Chamberlain
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=20231020082727.10659-1-zhoujie@nfschina.com \
--to=zhoujie@nfschina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=mcgrof@kernel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).