From: Zhaowei Yuan Date: Thu, 4 Sep 2014 02:28:06 +0000 (-0300) Subject: [media] s5p_mfc: correct the loop condition X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=00684dab287956573122815bfdc04cb4b4561033;p=deliverable%2Flinux.git [media] s5p_mfc: correct the loop condition It should take ctx->dst_fmt->num_planes as the loop condition for CAPTURE. Signed-off-by: Zhaowei Yuan Signed-off-by: Kamil Debski Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c index fe4d21ccfd49..9e47b969853b 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c @@ -990,7 +990,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");