summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/freescale
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2017-11-06 22:53:31 +0100
committerDavid S. Miller <davem@davemloft.net>2017-11-08 13:53:33 +0900
commit25850c31c8b5c2ce7fb922f5e80de7227ecf6be4 (patch)
tree214f6d2841b9325cf8a88546b85e225a0548a327 /drivers/net/ethernet/freescale
parent336eac4347e74589f868e5da9ca0106953942aa8 (diff)
downloadlinux-25850c31c8b5c2ce7fb922f5e80de7227ecf6be4.tar.bz2
fsl/fman: Add a missing 'of_node_put()' call in an error handling path
If 'of_phy_find_device()' fails, we must undo the previous 'of_node_get()' call, as done the the following error handling code. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r--drivers/net/ethernet/freescale/fman/mac.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fman/mac.c b/drivers/net/ethernet/freescale/fman/mac.c
index ca12e28129ed..86c1e69f44d6 100644
--- a/drivers/net/ethernet/freescale/fman/mac.c
+++ b/drivers/net/ethernet/freescale/fman/mac.c
@@ -821,6 +821,7 @@ static int mac_probe(struct platform_device *_of_dev)
phy = of_phy_find_device(mac_dev->phy_node);
if (!phy) {
err = -EINVAL;
+ of_node_put(mac_dev->phy_node);
goto _return_of_get_parent;
}