Skip to content

Commit 9d24911

Browse files
committed
smb: client: fix uninitialized variable in smb2_writev_callback
compiling with W=2 pointed out that "written may be used uninitialized" Fixes: 20d72b0 ("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>
1 parent 426a35d commit 9d24911

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/smb/client/smb2pdu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4955,7 +4955,7 @@ smb2_writev_callback(struct TCP_Server_Info *server, struct mid_q_entry *mid)
49554955
unsigned int rreq_debug_id = wdata->rreq->debug_id;
49564956
unsigned int subreq_debug_index = wdata->subreq.debug_index;
49574957
ssize_t result = 0;
4958-
size_t written;
4958+
size_t written = 0;
49594959

49604960
WARN_ONCE(wdata->server != server,
49614961
"wdata server %p != mid server %p",

0 commit comments

Comments
 (0)