diff options
author | Tom Lendacky <thomas.lendacky@amd.com> | 2013-12-10 17:38:44 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-12-20 13:06:22 +0100 |
commit | 369f3dabad95aaa3b04ec390d5489d9d46e51395 (patch) | |
tree | 494d90d88310fe987d9ae659f4697962557a3525 /drivers/crypto/ccp/ccp-crypto-aes-xts.c | |
parent | crypto: ccp - CCP Kconfig fixes (diff) | |
download | linux-369f3dabad95aaa3b04ec390d5489d9d46e51395.tar.xz linux-369f3dabad95aaa3b04ec390d5489d9d46e51395.zip |
crypto: ccp - Remove user triggerable pr_err calls
Remove the pr_err calls that are issued during parameter
checking in some AES operations. This will eliminate the
possibility of filling up syslog through these paths.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccp/ccp-crypto-aes-xts.c')
-rw-r--r-- | drivers/crypto/ccp/ccp-crypto-aes-xts.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/crypto/ccp/ccp-crypto-aes-xts.c b/drivers/crypto/ccp/ccp-crypto-aes-xts.c index d100b48415b6..0237ab58f242 100644 --- a/drivers/crypto/ccp/ccp-crypto-aes-xts.c +++ b/drivers/crypto/ccp/ccp-crypto-aes-xts.c @@ -125,20 +125,14 @@ static int ccp_aes_xts_crypt(struct ablkcipher_request *req, unsigned int unit; int ret; - if (!ctx->u.aes.key_len) { - pr_err("AES key not set\n"); + if (!ctx->u.aes.key_len) return -EINVAL; - } - if (req->nbytes & (AES_BLOCK_SIZE - 1)) { - pr_err("AES request size is not a multiple of the block size\n"); + if (req->nbytes & (AES_BLOCK_SIZE - 1)) return -EINVAL; - } - if (!req->info) { - pr_err("AES IV not supplied"); + if (!req->info) return -EINVAL; - } for (unit = 0; unit < ARRAY_SIZE(unit_size_map); unit++) if (!(req->nbytes & (unit_size_map[unit].size - 1))) |