diff options
Diffstat (limited to 'drivers/crypto/ccp/ccp-crypto-aes-cmac.c')
-rw-r--r-- | drivers/crypto/ccp/ccp-crypto-aes-cmac.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/crypto/ccp/ccp-crypto-aes-cmac.c b/drivers/crypto/ccp/ccp-crypto-aes-cmac.c index 5b9cd982339d..64dd35e291b0 100644 --- a/drivers/crypto/ccp/ccp-crypto-aes-cmac.c +++ b/drivers/crypto/ccp/ccp-crypto-aes-cmac.c @@ -63,10 +63,8 @@ static int ccp_do_cmac_update(struct ahash_request *req, unsigned int nbytes, unsigned int len, need_pad, sg_count; int ret; - if (!ctx->u.aes.key_len) { - pr_err("AES key not set\n"); + if (!ctx->u.aes.key_len) return -EINVAL; - } if (nbytes) rctx->null_msg = 0; |