summaryrefslogtreecommitdiff
path: root/drivers/crypto/ccp/ccp-crypto-aes.c
diff options
context:
space:
mode:
authorTom Lendacky <thomas.lendacky@amd.com>2013-12-10 20:38:44 +0400
committerHerbert Xu <herbert@gondor.apana.org.au>2013-12-20 16:06:22 +0400
commit369f3dabad95aaa3b04ec390d5489d9d46e51395 (patch)
tree494d90d88310fe987d9ae659f4697962557a3525 /drivers/crypto/ccp/ccp-crypto-aes.c
parentd5aa80952aba9071b50a74c8daf7feb1caa2fd8c (diff)
downloadlinux-369f3dabad95aaa3b04ec390d5489d9d46e51395.tar.xz
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.c')
-rw-r--r--drivers/crypto/ccp/ccp-crypto-aes.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/crypto/ccp/ccp-crypto-aes.c b/drivers/crypto/ccp/ccp-crypto-aes.c
index c0befdb2240b..e46490db0f63 100644
--- a/drivers/crypto/ccp/ccp-crypto-aes.c
+++ b/drivers/crypto/ccp/ccp-crypto-aes.c
@@ -76,24 +76,18 @@ static int ccp_aes_crypt(struct ablkcipher_request *req, bool encrypt)
unsigned int iv_len = 0;
int ret;
- if (!ctx->u.aes.key_len) {
- pr_err("AES key not set\n");
+ if (!ctx->u.aes.key_len)
return -EINVAL;
- }
if (((ctx->u.aes.mode == CCP_AES_MODE_ECB) ||
(ctx->u.aes.mode == CCP_AES_MODE_CBC) ||
(ctx->u.aes.mode == CCP_AES_MODE_CFB)) &&
- (req->nbytes & (AES_BLOCK_SIZE - 1))) {
- pr_err("AES request size is not a multiple of the block size\n");
+ (req->nbytes & (AES_BLOCK_SIZE - 1)))
return -EINVAL;
- }
if (ctx->u.aes.mode != CCP_AES_MODE_ECB) {
- if (!req->info) {
- pr_err("AES IV not supplied");
+ if (!req->info)
return -EINVAL;
- }
memcpy(rctx->iv, req->info, AES_BLOCK_SIZE);
iv_sg = &rctx->iv_sg;