aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/octeon/ethernet-mdio.c
diff options
context:
space:
mode:
authorSandhya Bankar <bankarsandhya512@gmail.com>2016-09-18 23:02:33 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-20 13:51:24 +0200
commit24586a35d3edfed3217fec3597861d52eb6d5814 (patch)
treee633e30a8b33fc8d3eda562374c6574a0d6258bc /drivers/staging/octeon/ethernet-mdio.c
parentstaging: i4l: act2000: Move assignment out of if statement (diff)
downloadlinux-dev-24586a35d3edfed3217fec3597861d52eb6d5814.tar.xz
linux-dev-24586a35d3edfed3217fec3597861d52eb6d5814.zip
Staging: octeon: Add missing of_node_put after calling of_parse_phandle.
of_node_put needs to be called when the device node which is got from of_parse_phandle is no longer used. This patch is found by below coccinelle script: @@ expression e,e1,e2; @@ *e = of_parse_phandle(...) ... when != of_node_put(e) when != true e == NULL when != e2 = e e = e1 Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/octeon/ethernet-mdio.c')
-rw-r--r--drivers/staging/octeon/ethernet-mdio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/octeon/ethernet-mdio.c b/drivers/staging/octeon/ethernet-mdio.c
index 1fde9c824948..691e4a51ace4 100644
--- a/drivers/staging/octeon/ethernet-mdio.c
+++ b/drivers/staging/octeon/ethernet-mdio.c
@@ -168,6 +168,7 @@ int cvm_oct_phy_setup_device(struct net_device *dev)
phydev = of_phy_connect(dev, phy_node, cvm_oct_adjust_link, 0,
PHY_INTERFACE_MODE_GMII);
+ of_node_put(phy_node);
if (!phydev)
return -ENODEV;