Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jia Jie Ho and committed by
Herbert Xu
3d12d90e 6117af86

+4
+4
drivers/crypto/starfive/jh7110-aes.c
··· 590 590 if (ret) 591 591 return ret; 592 592 593 + if (!cryp->total_in) 594 + goto finish_req; 595 + 593 596 starfive_aes_dma_init(cryp); 594 597 595 598 ret = starfive_aes_map_sg(cryp, rctx->in_sg, rctx->out_sg); 596 599 if (ret) 597 600 return ret; 598 601 602 + finish_req: 599 603 starfive_aes_finish_req(ctx); 600 604 601 605 return 0;