aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smbencrypt.c
diff options
context:
space:
mode:
authorShirish Pargaonkar <shirishpargaonkar@gmail.com>2011-06-20 17:14:03 -0400
committerSteve French <sfrench@us.ibm.com>2011-07-25 18:12:10 -0400
commit14cae3243b555afda69a57778069ddca65532c06 (patch)
tree7aad42f8f9812c9fcbfb2b81709152431eddc6b4 /fs/cifs/smbencrypt.c
parentf5bc1e755d23d022bf948904386337fc3e5e29a8 (diff)
cifs: Cleanup: check return codes of crypto api calls
Check return codes of crypto api calls and either log an error or log an error and return from the calling function with error. Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/smbencrypt.c')
-rw-r--r--fs/cifs/smbencrypt.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/cifs/smbencrypt.c b/fs/cifs/smbencrypt.c
index 1c5b770c3141..42b9fff48751 100644
--- a/fs/cifs/smbencrypt.c
+++ b/fs/cifs/smbencrypt.c
@@ -157,8 +157,14 @@ mdfour(unsigned char *md4_hash, unsigned char *link_str, int link_len)
157 cERROR(1, "%s: Could not init md4 shash\n", __func__); 157 cERROR(1, "%s: Could not init md4 shash\n", __func__);
158 goto mdfour_err; 158 goto mdfour_err;
159 } 159 }
160 crypto_shash_update(&sdescmd4->shash, link_str, link_len); 160 rc = crypto_shash_update(&sdescmd4->shash, link_str, link_len);
161 if (rc) {
162 cERROR(1, "%s: Could not update with link_str\n", __func__);
163 goto mdfour_err;
164 }
161 rc = crypto_shash_final(&sdescmd4->shash, md4_hash); 165 rc = crypto_shash_final(&sdescmd4->shash, md4_hash);
166 if (rc)
167 cERROR(1, "%s: Could not genereate md4 hash\n", __func__);
162 168
163mdfour_err: 169mdfour_err:
164 crypto_free_shash(md4); 170 crypto_free_shash(md4);