From: Namjae Jeon namjae.jeon@samsung.com
mainline inclusion from mainline-5.15-rc1 commit fd43cbbe0af5e528ec7e1f85e6e942d1b77ff781 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA
Reference: https://git.kernel.org/torvalds/linux/c/fd43cbbe0af5
-------------------------------
Just return smbhash() instead of using rc return value.
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 Signed-off-by: Jason Yan yanaijie@huawei.com Signed-off-by: Zhong Jinghua zhongjinghua@huawei.com --- fs/cifsd/auth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/cifsd/auth.c b/fs/cifsd/auth.c index 9263c9ce2dd2..ab698093f728 100644 --- a/fs/cifsd/auth.c +++ b/fs/cifsd/auth.c @@ -115,8 +115,7 @@ static int ksmbd_enc_p24(unsigned char *p21, const unsigned char *c8, unsigned c rc = smbhash(p24 + 8, c8, p21 + 7); if (rc) return rc; - rc = smbhash(p24 + 16, c8, p21 + 14); - return rc; + return smbhash(p24 + 16, c8, p21 + 14); }
/* produce a md4 message digest from data of length n bytes */