[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1451772719-2256-1-git-send-email-richard@nod.at>
Date: Sat, 2 Jan 2016 23:11:59 +0100
From: Richard Weinberger <richard@....at>
To: tytso@....edu
Cc: adilger.kernel@...ger.ca, linux-ext4@...r.kernel.org,
linux-kernel@...r.kernel.org, Richard Weinberger <richard@....at>
Subject: [PATCH] ext4: Fix return code checking of crypto_alloc_ablkcipher()
This function does never return NULL, IS_ERR() is sufficent.
Signed-off-by: Richard Weinberger <richard@....at>
---
fs/ext4/crypto_key.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/crypto_key.c b/fs/ext4/crypto_key.c
index c5882b3..436ea2a 100644
--- a/fs/ext4/crypto_key.c
+++ b/fs/ext4/crypto_key.c
@@ -234,8 +234,8 @@ retry:
goto out;
got_key:
ctfm = crypto_alloc_ablkcipher(cipher_str, 0, 0);
- if (!ctfm || IS_ERR(ctfm)) {
- res = ctfm ? PTR_ERR(ctfm) : -ENOMEM;
+ if (IS_ERR(ctfm)) {
+ res = PTR_ERR(ctfm);
printk(KERN_DEBUG
"%s: error %d (inode %u) allocating crypto tfm\n",
__func__, res, (unsigned) inode->i_ino);
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists