Skip to content

Commit ecb239d

Browse files
Nicolas Saenz Juliennedavem330
authored andcommitted
ethernet: fman: fix wrong of_node_put() in probe function
After getting a reference to the platform device's of_node the probe function ends up calling of_find_matching_node() using the node as an argument. The function takes care of decreasing the refcount on it. We are then incorrectly decreasing the refcount on that node again. This patch removes the unwarranted call to of_node_put(). Fixes: 414fd46 ("fsl/fman: Add FMan support") Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 6888389 commit ecb239d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • drivers/net/ethernet/freescale/fman

‎drivers/net/ethernet/freescale/fman/fman.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2786,7 +2786,7 @@ static struct fman *read_dts_node(struct platform_device *of_dev)
27862786
if (!muram_node) {
27872787
dev_err(&of_dev->dev, "%s: could not find MURAM node\n",
27882788
__func__);
2789-
goto fman_node_put;
2789+
goto fman_free;
27902790
}
27912791

27922792
err = of_address_to_resource(muram_node, 0,
@@ -2795,11 +2795,10 @@ static struct fman *read_dts_node(struct platform_device *of_dev)
27952795
of_node_put(muram_node);
27962796
dev_err(&of_dev->dev, "%s: of_address_to_resource() = %d\n",
27972797
__func__, err);
2798-
goto fman_node_put;
2798+
goto fman_free;
27992799
}
28002800

28012801
of_node_put(muram_node);
2802-
of_node_put(fm_node);
28032802

28042803
err = devm_request_irq(&of_dev->dev, irq, fman_irq, IRQF_SHARED,
28052804
"fman", fman);

0 commit comments

Comments
 (0)