浏览代码

dmaengine: ti-dma-crossbar: Add some 'of_node_put()' in error path.

Add some missing 'of_node_put()' in early exit error path.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Christophe JAILLET 8 年之前
父节点
当前提交
75bdc7f31a
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/dma/ti-dma-crossbar.c

+ 2 - 0
drivers/dma/ti-dma-crossbar.c

@@ -149,6 +149,7 @@ static int ti_am335x_xbar_probe(struct platform_device *pdev)
 	match = of_match_node(ti_am335x_master_match, dma_node);
 	if (!match) {
 		dev_err(&pdev->dev, "DMA master is not supported\n");
+		of_node_put(dma_node);
 		return -EINVAL;
 	}
 
@@ -339,6 +340,7 @@ static int ti_dra7_xbar_probe(struct platform_device *pdev)
 	match = of_match_node(ti_dra7_master_match, dma_node);
 	if (!match) {
 		dev_err(&pdev->dev, "DMA master is not supported\n");
+		of_node_put(dma_node);
 		return -EINVAL;
 	}