dmaengine: mv_xor: Call of_node_put() when breaking out of for_each_child_of_node()
PATCH 1/1 dmaengine: mv_xor: Call of_node_put() when breaking out of for_each_child_of_node()
In mv_xor_probe(), for_each_child_of_node() will automatically increase and decrease the refcount. We should call of_node_put() when breaking out of the iteration.
Fixes f7d12ef53ddf ("dma: mv_xor: add Device Tree binding")
Signed-off-by Liang He <[email protected]>
--- drivers/dma/mv_xor.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/dma/mv_xor.c +2 -0
@@ -1392,6 +1392,7 @@ static int mv_xor_probe(struct platform_device *pdev) irq =irq_of_parse_and_map (np,0 );if (!irq) { +of_node_put (np); ret = -ENODEV ; goto err_channel_add; }
@@ -1399,6 +1400,7 @@ static int mv_xor_probe(struct platform_device *pdev) chan =mv_xor_channel_add (xordev, pdev, i, cap_mask, irq);if (IS_ERR (chan)) { +of_node_put (np); ret =PTR_ERR (chan);irq_dispose_mapping (irq); goto err_channel_add;
Signature · 1 line
2.25.1