[PATCH 3/3] smb: client: Omit a variable initialisation in smb311_crypto_shash_allocate()
From: Markus Elfring
Date: Fri Oct 10 2025 - 02:52:05 EST
From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxxxx>
---
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