On 7/9/2022 2:52 pm, Herbert Xu wrote: > On Tue, Sep 06, 2022 at 10:51:49AM +0800, Peter Harliman Liem wrote: > > > > diff --git a/drivers/crypto/inside-secure/safexcel_cipher.c > b/drivers/crypto/inside-secure/safexcel_cipher.c > > index d68ef16650d4..3775497775e0 100644 > > --- a/drivers/crypto/inside-secure/safexcel_cipher.c > > +++ b/drivers/crypto/inside-secure/safexcel_cipher.c > > @@ -737,14 +737,17 @@ static int safexcel_send_req(struct > crypto_async_request *base, int ring, > > max(totlen_src, totlen_dst)); > > return -EINVAL; > > } > > - dma_map_sg(priv->dev, src, sreq->nr_src, DMA_BIDIRECTIONAL); > > + if (sreq->nr_src > 0) > > + dma_map_sg(priv->dev, src, sreq->nr_src, DMA_BIDIRECTIONAL); > > Where is the corresponding check on unmap? Added in v3. Thanks!