diff mbox

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

Message ID 20161219053351.21156-1-christophe.jaillet@wanadoo.fr (mailing list archive)
State Accepted
Headers show

Commit Message

Christophe JAILLET Dec. 19, 2016, 5:33 a.m. UTC
Add some missing 'of_node_put()' in early exit error path.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/dma/ti-dma-crossbar.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Vinod Koul Jan. 2, 2017, 5:08 a.m. UTC | #1
On Mon, Dec 19, 2016 at 06:33:51AM +0100, Christophe JAILLET wrote:
> Add some missing 'of_node_put()' in early exit error path.

Applied, Thanks
diff mbox

Patch

diff --git a/drivers/dma/ti-dma-crossbar.c b/drivers/dma/ti-dma-crossbar.c
index 3f24aeb48c0e..2403475a37cf 100644
--- a/drivers/dma/ti-dma-crossbar.c
+++ b/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;
 	}