summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhaowei Yuan <zhaowei.yuan@samsung.com>2014-08-20 15:04:12 +0800
committerSylwester Nawrocki <s.nawrocki@samsung.com>2014-08-25 03:05:30 -0700
commitdc02913495ad9a8fa75d57ab6b8232f10ba0b7c8 (patch)
tree2b639b89855809794dbb23ae59734ab7955ffbc9
parent028163eb61c492cc4a54038c6b188577a6a94f5b (diff)
downloadlinux-3.10-dc02913495ad9a8fa75d57ab6b8232f10ba0b7c8.tar.gz
linux-3.10-dc02913495ad9a8fa75d57ab6b8232f10ba0b7c8.tar.bz2
linux-3.10-dc02913495ad9a8fa75d57ab6b8232f10ba0b7c8.zip
media: s5p_mfc: correct the loop condition
It should take ctx->dst_fmt->num_planes as the loop condition for CAPTURE. Change-Id: Icc3bf357afefb263f76e37b7ffec23edb788560e Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc_dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
index 7b18a5055aa..d1c0a7a2607 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
@@ -996,7 +996,7 @@ static int s5p_mfc_buf_init(struct vb2_buffer *vb)
if (vq->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
if (ctx->capture_state == QUEUE_BUFS_MMAPED)
return 0;
- for (i = 0; i <= ctx->src_fmt->num_planes ; i++) {
+ for (i = 0; i < ctx->dst_fmt->num_planes; i++) {
if (IS_ERR_OR_NULL(ERR_PTR(
vb2_dma_contig_plane_dma_addr(vb, i)))) {
mfc_err("Plane mem not allocated\n");