Skip to content

Commit

Permalink
net: xilinx: fix memleak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Libo Chen authored and David S. Miller committed Aug 28, 2013
1 parent 03803a5 commit 282a1df
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 282a1df

Please sign in to comment.