= axivdma_clk_init;
struct device_node *node = pdev->dev.of_node;
struct xilinx_dma_device *xdev;
- struct device_node *child, *np = pdev->dev.of_node;
+ struct device_node *np = pdev->dev.of_node;
u32 num_frames, addr_width = XILINX_DMA_DFAULT_ADDRWIDTH, len_width;
int i, err;
platform_set_drvdata(pdev, xdev);
/* Initialize the channels */
- for_each_child_of_node(node, child) {
+ for_each_child_of_node_scoped(node, child) {
err = xilinx_dma_child_probe(xdev, child);
- if (err < 0) {
- of_node_put(child);
+ if (err < 0)
goto error;
- }
}
if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) {