Message ID | 20180323192358.95691-2-ebiggers3@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
diff --git a/fs/crypto/keyinfo.c b/fs/crypto/keyinfo.c index 96a1eae9e51d..8099388f5581 100644 --- a/fs/crypto/keyinfo.c +++ b/fs/crypto/keyinfo.c @@ -320,8 +320,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;