summaryrefslogtreecommitdiff
path: root/fs/ksmbd/smb2pdu.c
diff options
context:
space:
mode:
authorNamjae Jeon <namjae.jeon@samsung.com>2021-08-12 04:18:18 +0300
committerNamjae Jeon <namjae.jeon@samsung.com>2021-08-13 02:18:08 +0300
commitc6ce2b5716b04cc6ec36fa7e3c3b851368e6ee7c (patch)
tree4942f24de4a6fe1687589bbfaacc37c9583e21bd /fs/ksmbd/smb2pdu.c
parent5ec3df8e98f51e21fe1f46633b6085897f9b040e (diff)
downloadlinux-c6ce2b5716b04cc6ec36fa7e3c3b851368e6ee7c.tar.xz
ksmbd: use proper errno instead of -1 in smb2_get_ksmbd_tcon()
Use proper errno instead of -1 in smb2_get_ksmbd_tcon(). Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/ksmbd/smb2pdu.c')
-rw-r--r--fs/ksmbd/smb2pdu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c
index 4ac4fe22edde..8f6ffa427ebf 100644
--- a/fs/ksmbd/smb2pdu.c
+++ b/fs/ksmbd/smb2pdu.c
@@ -106,14 +106,14 @@ int smb2_get_ksmbd_tcon(struct ksmbd_work *work)
if (xa_empty(&work->sess->tree_conns)) {
ksmbd_debug(SMB, "NO tree connected\n");
- return -1;
+ return -ENOENT;
}
tree_id = le32_to_cpu(req_hdr->Id.SyncId.TreeId);
work->tcon = ksmbd_tree_conn_lookup(work->sess, tree_id);
if (!work->tcon) {
pr_err("Invalid tid %d\n", tree_id);
- return -1;
+ return -EINVAL;
}
return 1;