summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-09-06 14:44:38 +0100
committerSteve French <stfrench@microsoft.com>2021-09-08 17:15:48 -0500
commit36bbeb336584c3551bac72592bcaeeebb430fef1 (patch)
treea9002c1a2d6a4850650d15fce85352d551e7314d /fs
parent303fff2b8c77a85c62dbde3b27c24b084144c04c (diff)
downloadlinux-rpi-36bbeb336584c3551bac72592bcaeeebb430fef1.tar.gz
linux-rpi-36bbeb336584c3551bac72592bcaeeebb430fef1.tar.bz2
linux-rpi-36bbeb336584c3551bac72592bcaeeebb430fef1.zip
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/ksmbd/ndr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ksmbd/ndr.c b/fs/ksmbd/ndr.c
index a476de291f62..8317f7ca402b 100644
--- a/fs/ksmbd/ndr.c
+++ b/fs/ksmbd/ndr.c
@@ -275,11 +275,11 @@ int ndr_decode_dos_attr(struct ndr *n, struct xattr_dos_attrib *da)
if (ret)
return ret;
- ndr_read_int64(n, NULL);
+ ret = ndr_read_int64(n, NULL);
if (ret)
return ret;
- ndr_read_int64(n, NULL);
+ ret = ndr_read_int64(n, NULL);
if (ret)
return ret;