Skip to content

Commit

Permalink
crypto: sun4i-ss - cannot use DMA is the request is 0 length
Browse files Browse the repository at this point in the history
Do not use DMA is the request is 0 length.

Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Antoine Ténart authored and Herbert Xu committed Jun 19, 2017
1 parent 11be010 commit 0f52dda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/crypto/sunxi-ss/sun4i-ss-hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0f52dda

Please sign in to comment.