mirror of
https://github.com/torvalds/linux.git
synced 2024-09-20 23:13:00 +00:00
crypto: starfive - Skip dma setup for zeroed message
Skip dma setup and mapping for AES driver if plaintext is empty. Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
6117af8636
commit
3d12d90efa
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user