summaryrefslogtreecommitdiffstats
path: root/fs/cifs
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 18:23:31 -0600
commit4b550af519854421dfec9f7732cdddeb057134b2 (patch)
tree1825ff56dc8ce3ff6e93f09675bcfe4a947bf24b /fs/cifs
parentf34d69c3e54908c97708d0d65075f7c6074fc87e (diff)
downloadblackbird-obmc-linux-4b550af519854421dfec9f7732cdddeb057134b2.tar.gz
blackbird-obmc-linux-4b550af519854421dfec9f7732cdddeb057134b2.zip
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>
Diffstat (limited to 'fs/cifs')
-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)
ses->auth_key.response = kmalloc(baselen + tilen, GFP_KERNEL);
if (!ses->auth_key.response) {
- rc = ENOMEM;
+ rc = -ENOMEM;
ses->auth_key.len = 0;
goto setup_ntlmv2_rsp_ret;
}
OpenPOWER on IntegriCloud