From: Antoine Ténart Date: Thu, 1 Jun 2017 19:38:56 +0000 (+0200) Subject: crypto: sun4i-ss - cannot use DMA is the request is 0 length X-Git-Tag: v4.14-rc1~453^2~56 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0f52ddaed6500d0b74fcaf5568726068d385129f;p=platform%2Fkernel%2Flinux-rpi.git crypto: sun4i-ss - cannot use DMA is the request is 0 length Do not use DMA is the request is 0 length. Signed-off-by: Antoine Tenart Tested-by: Corentin Labbe Acked-by: Corentin Labbe Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-hash.c b/drivers/crypto/sunxi-ss/sun4i-ss-hash.c index e53c312..bc3cbde 100644 --- a/drivers/crypto/sunxi-ss/sun4i-ss-hash.c +++ b/drivers/crypto/sunxi-ss/sun4i-ss-hash.c @@ -250,7 +250,7 @@ static int sun4i_hash(struct ahash_request *areq) i = 0; in_sg = sg_next(in_sg); } - if (i == 1 && !op->len) + if (i == 1 && !op->len && areq->nbytes) dev_dbg(ss->dev, "We can DMA\n"); i = 0;