Re: [patch] [media] v4l: xilinx: missing error code
Hi Dan, Thank you for the patch. On Wednesday 24 June 2015 17:28:31 Dan Carpenter wrote: > We should set "ret" on this error path instead of returning success. > > Fixes: df3305156f98 ('[media] v4l: xilinx: Add Xilinx Video IP core') > Signed-off-by: Dan Carpenter Acked-by: Laurent Pinchart and applied to my tree. > diff --git a/drivers/media/platform/xilinx/xilinx-dma.c > b/drivers/media/platform/xilinx/xilinx-dma.c index 98e50e4..e779c93 100644 > --- a/drivers/media/platform/xilinx/xilinx-dma.c > +++ b/drivers/media/platform/xilinx/xilinx-dma.c > @@ -699,8 +699,10 @@ int xvip_dma_init(struct xvip_composite_device *xdev, > struct xvip_dma *dma, > > /* ... and the buffers queue... */ > dma->alloc_ctx = vb2_dma_contig_init_ctx(dma->xdev->dev); > - if (IS_ERR(dma->alloc_ctx)) > + if (IS_ERR(dma->alloc_ctx)) { > + ret = PTR_ERR(dma->alloc_ctx); > goto error; > + } > > /* Don't enable VB2_READ and VB2_WRITE, as using the read() and write() >* V4L2 APIs would be inefficient. Testing on the command line with a -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [patch] [media] v4l: xilinx: missing error code
Hi Dan, Thanks for the patch. > -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Wednesday, June 24, 2015 7:29 AM > To: Hyun Kwon > Cc: Laurent Pinchart; Mauro Carvalho Chehab; Michal Simek; Soren Brinkmann; > linux-media@vger.kernel.org; kernel-janit...@vger.kernel.org > Subject: [patch] [media] v4l: xilinx: missing error code > > We should set "ret" on this error path instead of returning success. > > Fixes: df3305156f98 ('[media] v4l: xilinx: Add Xilinx Video IP core') > Signed-off-by: Dan Carpenter Acked-by: Hyun Kwon Thanks, -hyun This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately. N�r��yb�X��ǧv�^�){.n�+{���bj)w*jg����ݢj/���z�ޖ��2�ޙ&�)ߡ�a�����G���h��j:+v���w��٥
[patch] [media] v4l: xilinx: missing error code
We should set "ret" on this error path instead of returning success. Fixes: df3305156f98 ('[media] v4l: xilinx: Add Xilinx Video IP core') Signed-off-by: Dan Carpenter diff --git a/drivers/media/platform/xilinx/xilinx-dma.c b/drivers/media/platform/xilinx/xilinx-dma.c index 98e50e4..e779c93 100644 --- a/drivers/media/platform/xilinx/xilinx-dma.c +++ b/drivers/media/platform/xilinx/xilinx-dma.c @@ -699,8 +699,10 @@ int xvip_dma_init(struct xvip_composite_device *xdev, struct xvip_dma *dma, /* ... and the buffers queue... */ dma->alloc_ctx = vb2_dma_contig_init_ctx(dma->xdev->dev); - if (IS_ERR(dma->alloc_ctx)) + if (IS_ERR(dma->alloc_ctx)) { + ret = PTR_ERR(dma->alloc_ctx); goto error; + } /* Don't enable VB2_READ and VB2_WRITE, as using the read() and write() * V4L2 APIs would be inefficient. Testing on the command line with a -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html