aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
authorSteve French <stfrench@microsoft.com>2026-05-22 18:28:49 -0500
committerSteve French <stfrench@microsoft.com>2026-05-27 17:15:43 -0500
commit9d2491197a00acf8c423512078458c2855102b66 (patch)
tree91b3a69eea8a37088ba1d2acb9140053cc804f51 /fs
parent426a35d7530722ffa2d89d759c39f5157e0e500d (diff)
downloadlinux-next-history-9d2491197a00acf8c423512078458c2855102b66.tar.gz
smb: client: fix uninitialized variable in smb2_writev_callback
compiling with W=2 pointed out that "written may be used uninitialized" Fixes: 20d72b00ca81 ("netfs: Fix the request's work item to not require a ref") Cc: stable@vger.kernel.org Reviewed-by: David Howells <dhowells@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/smb/client/smb2pdu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c
index 3bd300347f16e..fbeb2156ddb6b 100644
--- a/fs/smb/client/smb2pdu.c
+++ b/fs/smb/client/smb2pdu.c
@@ -4955,7 +4955,7 @@ smb2_writev_callback(struct TCP_Server_Info *server, struct mid_q_entry *mid)
unsigned int rreq_debug_id = wdata->rreq->debug_id;
unsigned int subreq_debug_index = wdata->subreq.debug_index;
ssize_t result = 0;
- size_t written;
+ size_t written = 0;
WARN_ONCE(wdata->server != server,
"wdata server %p != mid server %p",