diff options
author | Namjae Jeon <namjae.jeon@samsung.com> | 2021-05-26 15:28:09 +0900 |
---|---|---|
committer | Namjae Jeon <namjae.jeon@samsung.com> | 2021-05-26 18:12:11 +0900 |
commit | 4a6b02282632f0b4e88a85f26266f7674e0ce288 (patch) | |
tree | 7e80a4878ecec7e586f122f31470d6d59bdf6f14 /fs | |
parent | 7e38ea254c8274ea25ffc28df65ac2683c5f8a72 (diff) |
cifsd: simplify error handling in ksmbd_auth_ntlm()
simplify error handling in ksmbd_auth_ntlm().
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifsd/auth.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/cifsd/auth.c b/fs/cifsd/auth.c index 092db15e4234..7771429f55a4 100644 --- a/fs/cifsd/auth.c +++ b/fs/cifsd/auth.c @@ -351,12 +351,11 @@ int ksmbd_auth_ntlm(struct ksmbd_session *sess, char *pw_buf) if (strncmp(pw_buf, key, CIFS_AUTH_RESP_SIZE) != 0) { ksmbd_debug(AUTH, "ntlmv1 authentication failed\n"); - rc = -EINVAL; - } else { - ksmbd_debug(AUTH, "ntlmv1 authentication pass\n"); + return -EINVAL; } - return rc; + ksmbd_debug(AUTH, "ntlmv1 authentication pass\n"); + return 0; } /** |