Skip to content

Commit a07d8c1

Browse files
tititiou36gregkh
authored andcommitted
dmaengine: ti-dma-crossbar: Add some 'of_node_put()' in error path.
[ Upstream commit 75bdc7f31a3a6e9a12e218b31a44a1f54a91554c ] 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> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 328a9cd commit a07d8c1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/dma/ti-dma-crossbar.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ static int ti_am335x_xbar_probe(struct platform_device *pdev)
146146
match = of_match_node(ti_am335x_master_match, dma_node);
147147
if (!match) {
148148
dev_err(&pdev->dev, "DMA master is not supported\n");
149+
of_node_put(dma_node);
149150
return -EINVAL;
150151
}
151152

@@ -310,6 +311,7 @@ static int ti_dra7_xbar_probe(struct platform_device *pdev)
310311
match = of_match_node(ti_dra7_master_match, dma_node);
311312
if (!match) {
312313
dev_err(&pdev->dev, "DMA master is not supported\n");
314+
of_node_put(dma_node);
313315
return -EINVAL;
314316
}
315317

0 commit comments

Comments
 (0)