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 <[email protected]>
Acked-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
? 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;
}