From: Alexey Khoroshilov Date: Fri, 7 Apr 2017 23:09:17 +0000 (-0300) Subject: [media] m2m-deinterlace: don't return zero on failure paths in deinterlace_probe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=41309271448e559afe208f1e89d4d30b83259678;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- 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; }