提交 9919479b 编写于 作者: E Eric Biggers 提交者: Theodore Ts'o

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: NEric Biggers <ebiggers@google.com>
Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
上级 54222025
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册