From 522dcc76269fcc27a3a0128ca7699270fae61b60 Mon Sep 17 00:00:00 2001 From: Namjae Jeon Date: Wed, 26 May 2021 15:30:50 +0900 Subject: [PATCH] cifsd: never return 1 on failure Never return 1 on failure. Reviewed-by: Dan Carpenter Signed-off-by: Namjae Jeon Signed-off-by: Steve French --- fs/cifsd/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifsd/auth.c b/fs/cifsd/auth.c index a89de24aa576..7e56966f87d4 100644 --- a/fs/cifsd/auth.c +++ b/fs/cifsd/auth.c @@ -1144,7 +1144,7 @@ static int ksmbd_get_encryption_key(struct ksmbd_conn *conn, __u64 ses_id, sess = ksmbd_session_lookup(conn, ses_id); if (!sess) - return 1; + return -EINVAL; ses_enc_key = enc ? sess->smb3encryptionkey : sess->smb3decryptionkey;