提交 b8d64282 编写于 作者: L Laurent Pinchart 提交者: Mauro Carvalho Chehab

[media] omap3isp: queue: Fix the dma_map_sg() return value check

dma_map_sg() can merge sglist entries, and can thus return a number of
mapped entries different than the original value. Don't consider this as
an error.
Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: NSakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
上级 7f5036d0
......@@ -465,7 +465,7 @@ static int isp_video_buffer_prepare(struct isp_video_buffer *buf)
? DMA_FROM_DEVICE : DMA_TO_DEVICE;
ret = dma_map_sg(buf->queue->dev, buf->sgt.sgl,
buf->sgt.orig_nents, direction);
if (ret != buf->sgt.orig_nents) {
if (ret <= 0) {
ret = -EFAULT;
goto done;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册