forked from Minki/linux
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>
This commit is contained in:
parent
5ec3df8e98
commit
c6ce2b5716
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user