net: xilinx: fix memleak
authorLibo Chen <clbchenlibo.chen@huawei.com>
Mon, 26 Aug 2013 03:30:55 +0000 (11:30 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Aug 2013 22:24:31 +0000 (18:24 -0400)
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>
drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c

index e90e1f46121ef2e0fcacc1a1b3ec5b198b2df94d..64b4639f43b6bea6b0e69155a7cb7043a14abcc4 100644 (file)
@@ -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;
        }