From: Markus Elfring <Markus.Elfring@web.de>
To: linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
Aurelien Aptel <aaptel@suse.com>,
Bharath SM <bharathsm@microsoft.com>,
Paulo Alcantara <pc@manguebit.org>,
Ronnie Sahlberg <ronniesahlberg@gmail.com>,
Shyam Prasad N <sprasad@microsoft.com>,
Steve French <sfrench@samba.org>, Tom Talpey <tom@talpey.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 3/3] smb: client: Omit a variable initialisation in smb311_crypto_shash_allocate()
Date: Fri, 10 Oct 2025 08:51:38 +0200 [thread overview]
Message-ID: <8f7ac740-e6a8-4c37-a0aa-e0572c87fe9e@web.de> (raw)
In-Reply-To: <e8a44f5e-0f29-40ab-a6a3-74802cd970aa@web.de>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 10 Oct 2025 08:05:21 +0200
Subject: [PATCH 3/3] smb: client: Omit a variable initialisation in smb311_crypto_shash_allocate()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The local variable “rc” is immediately reassigned. Thus omit the explicit
initialisation at the beginning.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
fs/smb/client/smb2transport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/smb/client/smb2transport.c b/fs/smb/client/smb2transport.c
index b790f6b970a9..3f8b0509f8c8 100644
--- a/fs/smb/client/smb2transport.c
+++ b/fs/smb/client/smb2transport.c
@@ -50,7 +50,7 @@ int
smb311_crypto_shash_allocate(struct TCP_Server_Info *server)
{
struct cifs_secmech *p = &server->secmech;
- int rc = 0;
+ int rc;
rc = cifs_alloc_hash("hmac(sha256)", &p->hmacsha256);
if (rc)
--
2.51.0
next prev parent reply other threads:[~2025-10-10 6:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-10 6:45 [PATCH 0/3] smb: client: Better exception handling for SMB3 hash allocations Markus Elfring
2025-10-10 6:48 ` [PATCH 1/3] smb: client: Return directly after a failed cifs_alloc_hash() in smb3_crypto_shash_allocate() Markus Elfring
2025-10-10 6:50 ` [PATCH 2/3] smb: client: Improve resource release in smb311_crypto_shash_allocate() Markus Elfring
2025-10-10 6:51 ` Markus Elfring [this message]
2025-10-10 21:47 ` [PATCH 3/3] smb: client: Omit a variable initialisation " Steve French
2025-10-13 19:45 ` Steve French
2025-10-12 9:44 ` [0/3] smb: client: Better exception handling for SMB3 hash allocations Markus Elfring
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=8f7ac740-e6a8-4c37-a0aa-e0572c87fe9e@web.de \
--to=markus.elfring@web.de \
--cc=aaptel@suse.com \
--cc=bharathsm@microsoft.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pc@manguebit.org \
--cc=ronniesahlberg@gmail.com \
--cc=samba-technical@lists.samba.org \
--cc=sfrench@samba.org \
--cc=sprasad@microsoft.com \
--cc=tom@talpey.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