Commit 41309271 authored by Alexey Khoroshilov's avatar Alexey Khoroshilov Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 9d826ce8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}