Skip to content

Commit 99974ae

Browse files
Shravya Kumbhamvinodkoul
authored andcommitted
dmaengine: xilinx_dma: check dma_async_device_register return value
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: 9cd4360 ("dma: Add Xilinx AXI Video Direct Memory Access Engine driver support") Signed-off-by: Shravya Kumbham <shravya.kumbham@xilinx.com> Signed-off-by: Radhey 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: Vinod Koul <vkoul@kernel.org>
1 parent 0bd1bf8 commit 99974ae

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

drivers/dma/xilinx/xilinx_dma.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3112,7 +3112,11 @@ static int xilinx_dma_probe(struct platform_device *pdev)
31123112
}
31133113

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

31173121
err = of_dma_controller_register(node, of_dma_xilinx_xlate,
31183122
xdev);

0 commit comments

Comments
 (0)