]> git.baikalelectronics.ru Git - kernel.git/commit
CIFS: Fix some return values in case of error in 'crypt_message'
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Sun, 11 Jun 2017 07:12:47 +0000 (09:12 +0200)
committerSteve French <smfrench@gmail.com>
Wed, 21 Jun 2017 05:09:28 +0000 (00:09 -0500)
commitc37165e041ba710c0654886e18387f68e6494a9a
tree4abc165240c6f48044e475c58609202fb5fe16a4
parenta9d83acca83a7785f5d84ffa67db62363caf8a06
CIFS: Fix some return values in case of error in 'crypt_message'

'rc' is known to be 0 at this point. So if 'init_sg' or 'kzalloc' fails, we
should return -ENOMEM instead.

Also remove a useless 'rc' in a debug message as it is meaningless here.

Fixes: a976e47997d2d ("CIFS: Encrypt SMB3 requests before sending")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <smfrench@gmail.com>
CC: Stable <stable@vger.kernel.org>
fs/cifs/smb2ops.c