summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-03-09 17:58:37 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-25 11:16:18 -0300
commitb8d642826d031c8700ff1ad601fedf1ebe351033 (patch)
tree74c53c152e44ea939412f03027120cb2165f5912 /drivers/media
parent7f5036d059fbd263b5322a4298a9935698e7625d (diff)
downloadop-kernel-dev-b8d642826d031c8700ff1ad601fedf1ebe351033.zip
op-kernel-dev-b8d642826d031c8700ff1ad601fedf1ebe351033.tar.gz
[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>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/omap3isp/ispqueue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/omap3isp/ispqueue.c b/drivers/media/platform/omap3isp/ispqueue.c
index 2fd254f..479d348 100644
--- a/drivers/media/platform/omap3isp/ispqueue.c
+++ b/drivers/media/platform/omap3isp/ispqueue.c
@@ -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;
}
OpenPOWER on IntegriCloud