mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-25 21:54:06 +08:00
[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: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:
parent
7f5036d059
commit
b8d642826d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user