aboutsummaryrefslogtreecommitdiff
path: root/fs/cifs/link.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/link.c')
-rw-r--r--fs/cifs/link.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/cifs/link.c b/fs/cifs/link.c
index d3444ea6ac7..02cd60aefbf 100644
--- a/fs/cifs/link.c
+++ b/fs/cifs/link.c
@@ -54,10 +54,9 @@ symlink_hash(unsigned int link_len, const char *link_str, u8 *md5_hash)
struct sdesc *sdescmd5;
md5 = crypto_alloc_shash("md5", 0, 0);
- if (!md5 || IS_ERR(md5)) {
- rc = PTR_ERR(md5);
+ if (IS_ERR(md5)) {
cERROR(1, "%s: Crypto md5 allocation error %d\n", __func__, rc);
- return rc;
+ return PTR_ERR(md5);
}
size = sizeof(struct shash_desc) + crypto_shash_descsize(md5);
sdescmd5 = kmalloc(size, GFP_KERNEL);