Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ee2d7aa authored by Shravya Kumbham's avatar Shravya Kumbham Committed by Greg Kroah-Hartman
Browse files

dmaengine: xilinx_dma: check dma_async_device_register return value



commit 99974aedbd73523969afb09f33c6e3047cd0ddae upstream.

dma_async_device_register() can return non-zero error code. Add
condition to check the return value of dma_async_device_register
function and handle the error path.

Addresses-Coverity: Event check_return.
Fixes: 9cd4360d ("dma: Add Xilinx AXI Video Direct Memory Access Engine driver support")
Signed-off-by: default avatarShravya Kumbham <shravya.kumbham@xilinx.com>
Signed-off-by: default avatarRadhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Link: https://lore.kernel.org/r/1608722462-29519-2-git-send-email-radhey.shyam.pandey@xilinx.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2d52bed9
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2713,7 +2713,11 @@ static int xilinx_dma_probe(struct platform_device *pdev)
	}

	/* Register the DMA engine with the core */
	dma_async_device_register(&xdev->common);
	err = dma_async_device_register(&xdev->common);
	if (err) {
		dev_err(xdev->dev, "failed to register the dma device\n");
		goto error;
	}

	err = of_dma_controller_register(node, of_dma_xilinx_xlate,
					 xdev);