summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibo Chen <clbchenlibo.chen@huawei.com>2013-08-26 11:30:55 +0800
committerDavid S. Miller <davem@davemloft.net>2013-08-28 18:24:31 -0400
commit282a1dffc1b9976cdf1b0eea3f6f68fda23a7c7e (patch)
tree5402552e864e2b1173f924235bf80a0749ee1ef3
parent03803a59e32453ee5737c6096a295f748f03cc49 (diff)
downloadlinux-282a1dffc1b9976cdf1b0eea3f6f68fda23a7c7e.tar.gz
net: xilinx: fix memleak
decrease device_node refcount np1 in err case. Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c b/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c
index e90e1f4..64b4639 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c
@@ -175,6 +175,7 @@ int axienet_mdio_setup(struct axienet_local *lp, struct device_node *np)
printk(KERN_WARNING "Setting MDIO clock divisor to "
"default %d\n", DEFAULT_CLOCK_DIVISOR);
clk_div = DEFAULT_CLOCK_DIVISOR;
+ of_node_put(np1);
goto issue;
}