summaryrefslogtreecommitdiffstats
path: root/fs/cifs/link.c
diff options
context:
space:
mode:
authorShirish Pargaonkar <shirishpargaonkar@gmail.com>2011-06-20 16:14:03 -0500
committerSteve French <sfrench@us.ibm.com>2011-07-25 22:12:10 +0000
commit14cae3243b555afda69a57778069ddca65532c06 (patch)
tree7aad42f8f9812c9fcbfb2b81709152431eddc6b4 /fs/cifs/link.c
parentf5bc1e755d23d022bf948904386337fc3e5e29a8 (diff)
downloadlinux-14cae3243b555afda69a57778069ddca65532c06.tar.gz
linux-14cae3243b555afda69a57778069ddca65532c06.tar.bz2
linux-14cae3243b555afda69a57778069ddca65532c06.zip
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/link.c')
-rw-r--r--fs/cifs/link.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/cifs/link.c b/fs/cifs/link.c
index 556b1a0b54de..db3f18cdf024 100644
--- a/fs/cifs/link.c
+++ b/fs/cifs/link.c
@@ -74,8 +74,14 @@ symlink_hash(unsigned int link_len, const char *link_str, u8 *md5_hash)
cERROR(1, "%s: Could not init md5 shash\n", __func__);
goto symlink_hash_err;
}
- crypto_shash_update(&sdescmd5->shash, link_str, link_len);
+ rc = crypto_shash_update(&sdescmd5->shash, link_str, link_len);
+ if (rc) {
+ cERROR(1, "%s: Could not update iwth link_str\n", __func__);
+ goto symlink_hash_err;
+ }
rc = crypto_shash_final(&sdescmd5->shash, md5_hash);
+ if (rc)
+ cERROR(1, "%s: Could not generate md5 hash\n", __func__);
symlink_hash_err:
crypto_free_shash(md5);