提交 0f52ddae 编写于 作者: A Antoine Ténart 提交者: 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: NAntoine Tenart <antoine.tenart@free-electrons.com>
Tested-by: NCorentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: NCorentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 11be0107
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册