]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ethernet: marvell: pxa168_eth: add missing of_node_put after calling of_parse_phandle
authorPeter Chen <peter.chen@nxp.com>
Mon, 1 Aug 2016 07:02:38 +0000 (15:02 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Aug 2016 04:43:48 +0000 (21:43 -0700)
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/pxa168_eth.c

index aeeb2e79a91a734f3083cc3c733af392f93b711d..5d5000c8edf1db72e179249cf4abf20011e3301f 100644 (file)
@@ -1506,6 +1506,7 @@ static int pxa168_eth_probe(struct platform_device *pdev)
                }
                of_property_read_u32(np, "reg", &pep->phy_addr);
                pep->phy_intf = of_get_phy_mode(pdev->dev.of_node);
+               of_node_put(np);
        }
 
        /* Hardware supports only 3 ports */