smb: client: fix uninitialized variable in smb2_writev_callback

compiling with W=2 pointed out that "written may be used uninitialized"

Fixes: 20d72b00ca ("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>
This commit is contained in:
Steve French 2026-05-22 18:28:49 -05:00
parent 426a35d753
commit 9d2491197a

View File

@ -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",