summaryrefslogtreecommitdiff
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorAlexey Khoroshilov <khoroshilov@ispras.ru>2017-04-08 02:09:17 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-04-10 20:43:31 +0300
commit41309271448e559afe208f1e89d4d30b83259678 (patch)
tree45aa724327abc22a8afa55b8add88bdcb1db0af0 /drivers/media/platform
parent9d826ce8122fc634c1b67bc6f8985ccfbd565d86 (diff)
downloadlinux-41309271448e559afe208f1e89d4d30b83259678.tar.xz
[media] m2m-deinterlace: don't return zero on failure paths in deinterlace_probe()
If DMA does not support INTERLEAVE, deinterlace_probe() breaks off initialization, releases dma channel, but returns zero. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r--drivers/media/platform/m2m-deinterlace.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/m2m-deinterlace.c b/drivers/media/platform/m2m-deinterlace.c
index bedc7cc4c7d6..980066b8d32a 100644
--- a/drivers/media/platform/m2m-deinterlace.c
+++ b/drivers/media/platform/m2m-deinterlace.c
@@ -1017,6 +1017,7 @@ static int deinterlace_probe(struct platform_device *pdev)
if (!dma_has_cap(DMA_INTERLEAVE, pcdev->dma_chan->device->cap_mask)) {
dev_err(&pdev->dev, "DMA does not support INTERLEAVE\n");
+ ret = -ENODEV;
goto rel_dma;
}