Skip to content

Commit 36bbeb3

Browse files
Colin Ian KingSteve French
authored andcommitted
ksmbd: add missing assignments to ret on ndr_read_int64 read calls
Currently there are two ndr_read_int64 calls where ret is being checked for failure but ret is not being assigned a return value from the call. Static analyis is reporting the checks on ret as dead code. Fix this. Addresses-Coverity: ("Logical dead code") Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org> Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 303fff2 commit 36bbeb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/ksmbd/ndr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,11 @@ int ndr_decode_dos_attr(struct ndr *n, struct xattr_dos_attrib *da)
275275
if (ret)
276276
return ret;
277277

278-
ndr_read_int64(n, NULL);
278+
ret = ndr_read_int64(n, NULL);
279279
if (ret)
280280
return ret;
281281

282-
ndr_read_int64(n, NULL);
282+
ret = ndr_read_int64(n, NULL);
283283
if (ret)
284284
return ret;
285285

0 commit comments

Comments
 (0)