mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
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: Eric Biggers <ebiggers@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
fb10231825
commit
f68d3b84ae
|
|
@ -317,8 +317,8 @@ int fscrypt_get_encryption_info(struct inode *inode)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
ctfm = crypto_alloc_skcipher(cipher_str, 0, 0);
|
ctfm = crypto_alloc_skcipher(cipher_str, 0, 0);
|
||||||
if (!ctfm || IS_ERR(ctfm)) {
|
if (IS_ERR(ctfm)) {
|
||||||
res = ctfm ? PTR_ERR(ctfm) : -ENOMEM;
|
res = PTR_ERR(ctfm);
|
||||||
pr_debug("%s: error %d (inode %lu) allocating crypto tfm\n",
|
pr_debug("%s: error %d (inode %lu) allocating crypto tfm\n",
|
||||||
__func__, res, inode->i_ino);
|
__func__, res, inode->i_ino);
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user