From dc02913495ad9a8fa75d57ab6b8232f10ba0b7c8 Mon Sep 17 00:00:00 2001 From: Zhaowei Yuan Date: Wed, 20 Aug 2014 15:04:12 +0800 Subject: [PATCH] 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 --- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c index 7b18a50..d1c0a7a 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"); -- 2.7.4