Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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 <dan.carpenter@oracle.com>
Acked-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

Dan Carpenter and committed by
Mauro Carvalho Chehab
e31f8f00 d32d9864

+3 -1
+3 -1
drivers/media/platform/xilinx/xilinx-dma.c
··· 699 699 700 700 /* ... and the buffers queue... */ 701 701 dma->alloc_ctx = vb2_dma_contig_init_ctx(dma->xdev->dev); 702 - if (IS_ERR(dma->alloc_ctx)) 702 + if (IS_ERR(dma->alloc_ctx)) { 703 + ret = PTR_ERR(dma->alloc_ctx); 703 704 goto error; 705 + } 704 706 705 707 /* Don't enable VB2_READ and VB2_WRITE, as using the read() and write() 706 708 * V4L2 APIs would be inefficient. Testing on the command line with a