mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04: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 <[email protected]> Signed-off-by: Theodore Ts'o <[email protected]>
This commit is contained in:
parent
54222025f2
commit
9919479b83
1 changed files with 2 additions and 2 deletions
|
|
@ -318,8 +318,8 @@ int fscrypt_get_encryption_info(struct inode *inode)
|
|||
goto out;
|
||||
}
|
||||
ctfm = crypto_alloc_skcipher(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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue