Commit 0f52ddae authored by Antoine Ténart's avatar Antoine Ténart Committed by Herbert Xu

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: default avatarAntoine Tenart <antoine.tenart@free-electrons.com>
Tested-by: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 11be0107
...@@ -250,7 +250,7 @@ static int sun4i_hash(struct ahash_request *areq) ...@@ -250,7 +250,7 @@ static int sun4i_hash(struct ahash_request *areq)
i = 0; i = 0;
in_sg = sg_next(in_sg); 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"); dev_dbg(ss->dev, "We can DMA\n");
i = 0; i = 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