Skip to content

Commit 65b1cbf

Browse files
aspskgregkh
authored andcommitted
cifs: fix erroneous return value
commit 4b550af upstream. The setup_ntlmv2_rsp() function may return positive value ENOMEM instead of -ENOMEM in case of kmalloc failure. Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com> Signed-off-by: Steve French <smfrench@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2388eb1 commit 65b1cbf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/cifs/cifsencrypt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ setup_ntlmv2_rsp(struct cifs_ses *ses, const struct nls_table *nls_cp)
591591

592592
ses->auth_key.response = kmalloc(baselen + tilen, GFP_KERNEL);
593593
if (!ses->auth_key.response) {
594-
rc = ENOMEM;
594+
rc = -ENOMEM;
595595
ses->auth_key.len = 0;
596596
goto setup_ntlmv2_rsp_ret;
597597
}

0 commit comments

Comments
 (0)