Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 347264d8 authored by Eric Biggers's avatar Eric Biggers Committed by Jaegeuk Kim
Browse files

fscrypt: remove unnecessary NULL check when allocating skcipher



crypto_alloc_skcipher() returns an ERR_PTR() on failure, not NULL.
Remove the unnecessary check for NULL.

Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent f6b4b095
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -330,8 +330,8 @@ int fscrypt_get_encryption_info(struct inode *inode)
		goto out;
	}
	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);
		pr_debug("%s: error %d (inode %lu) allocating crypto tfm\n",
			 __func__, res, inode->i_ino);
		goto out;