aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Protopopov <a.s.protopopov@gmail.com>2016-02-10 12:50:21 -0500
committerSteve French <smfrench@gmail.com>2016-02-10 19:23:31 -0500
commit4b550af519854421dfec9f7732cdddeb057134b2 (patch)
tree1825ff56dc8ce3ff6e93f09675bcfe4a947bf24b
parentf34d69c3e54908c97708d0d65075f7c6074fc87e (diff)
cifs: fix erroneous return value
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> CC: Stable <stable@vger.kernel.org> Signed-off-by: Steve French <smfrench@gmail.com>
-rw-r--r--fs/cifs/cifsencrypt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c
index afa09fce8151..e682b36a210f 100644
--- a/fs/cifs/cifsencrypt.c
+++ b/fs/cifs/cifsencrypt.c
@@ -714,7 +714,7 @@ setup_ntlmv2_rsp(struct cifs_ses *ses, const struct nls_table *nls_cp)
714 714
715 ses->auth_key.response = kmalloc(baselen + tilen, GFP_KERNEL); 715 ses->auth_key.response = kmalloc(baselen + tilen, GFP_KERNEL);
716 if (!ses->auth_key.response) { 716 if (!ses->auth_key.response) {
717 rc = ENOMEM; 717 rc = -ENOMEM;
718 ses->auth_key.len = 0; 718 ses->auth_key.len = 0;
719 goto setup_ntlmv2_rsp_ret; 719 goto setup_ntlmv2_rsp_ret;
720 } 720 }