summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2014-05-08 12:09:24 +0400
committerDavid S. Miller <davem@davemloft.net>2014-05-09 23:51:20 +0400
commit60e71ab56b5fbd839aaef4f4af7778d86e0206f0 (patch)
tree0192e60dd7debe60551f4e67bc8919c90f7dfa59
parent6954cc1f238199e971ec905c5cc87120806ac981 (diff)
downloadlinux-60e71ab56b5fbd839aaef4f4af7778d86e0206f0.tar.xz
net: cpsw: add missing of_node_put
Add missing of_node_put to avoid kref leak. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/ti/cpsw.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index db9360cd861c..c331b7ebc812 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1871,6 +1871,7 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
mdio_node = of_find_node_by_phandle(be32_to_cpup(parp));
phyid = be32_to_cpup(parp+1);
mdio = of_find_device_by_node(mdio_node);
+ of_node_put(mdio_node);
if (!mdio) {
pr_err("Missing mdio platform device\n");
return -EINVAL;