aboutsummaryrefslogtreecommitdiff
path: root/fs/crypto/crypto.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-04-30 15:51:38 -0700
committerTheodore Ts'o <tytso@mit.edu>2018-05-20 16:21:00 -0400
commitc90fd77562479165c1f1de7e334071f76b8ab17e (patch)
treeefc5283a191feebd1bc260d4d37d20f5123a9e77 /fs/crypto/crypto.c
parent9919479b835cb1c92b75965f2e120395078a1c55 (diff)
fscrypt: remove error messages for skcipher_request_alloc() failure
skcipher_request_alloc() can only fail due to lack of memory, and in that case the memory allocator will have already printed a detailed error message. Thus, remove the redundant error messages from fscrypt. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/crypto/crypto.c')
-rw-r--r--fs/crypto/crypto.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c
index dd3a0164eec4..ea95d72acb75 100644
--- a/fs/crypto/crypto.c
+++ b/fs/crypto/crypto.c
@@ -156,12 +156,8 @@ int fscrypt_do_page_crypto(const struct inode *inode, fscrypt_direction_t rw,
}
req = skcipher_request_alloc(tfm, gfp_flags);
- if (!req) {
- printk_ratelimited(KERN_ERR
- "%s: crypto_request_alloc() failed\n",
- __func__);
+ if (!req)
return -ENOMEM;
- }
skcipher_request_set_callback(
req, CRYPTO_TFM_REQ_MAY_BACKLOG | CRYPTO_TFM_REQ_MAY_SLEEP,