OSDN Git Service

[media] m2m-deinterlace: don't return zero on failure paths in deinterlace_probe()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 7 Apr 2017 23:09:17 +0000 (20:09 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 10 Apr 2017 17:43:31 +0000 (14:43 -0300)
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>
drivers/media/platform/m2m-deinterlace.c

index bedc7cc..980066b 100644 (file)
@@ -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;
        }