diff options
author | Anton Protopopov <a.s.protopopov@gmail.com> | 2016-02-10 12:50:21 -0500 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2016-02-24 10:29:50 +0100 |
commit | 69ef7d4fd9644907eb842a9a49887063df972331 (patch) | |
tree | 84215d2a8586646e40966a0eae41acbac06834c8 | |
parent | ec6e80b82e3c3ee5ee5c1f38983eeb3e88d7851e (diff) | |
download | lwn-69ef7d4fd9644907eb842a9a49887063df972331.tar.gz lwn-69ef7d4fd9644907eb842a9a49887063df972331.zip |
cifs: fix erroneous return value
commit 4b550af519854421dfec9f7732cdddeb057134b2 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: Jiri Slaby <jslaby@suse.cz>
-rw-r--r-- | fs/cifs/cifsencrypt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c index 134ed52f616f..684e1c5ad46d 100644 --- a/fs/cifs/cifsencrypt.c +++ b/fs/cifs/cifsencrypt.c @@ -703,7 +703,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; } |