Commit 3d12d90e authored by Jia Jie Ho's avatar Jia Jie Ho Committed by Herbert Xu

crypto: starfive - Skip dma setup for zeroed message

Skip dma setup and mapping for AES driver if plaintext is empty.
Signed-off-by: default avatarJia Jie Ho <jiajie.ho@starfivetech.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 6117af86
......@@ -590,12 +590,16 @@ static int starfive_aes_do_one_req(struct crypto_engine *engine, void *areq)
if (ret)
return ret;
if (!cryp->total_in)
goto finish_req;
starfive_aes_dma_init(cryp);
ret = starfive_aes_map_sg(cryp, rctx->in_sg, rctx->out_sg);
if (ret)
return ret;
finish_req:
starfive_aes_finish_req(ctx);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment