aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/net/phy
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-02-10 18:42:07 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-02-10 18:42:07 +0000
commit301948b0495741c3a2cb183fe903ff67a23a3ca7 (patch)
tree4859d7adde1b2e9d7042295f8bb6edad8777e646 /target/linux/generic/files/drivers/net/phy
parentf28ac30869a46a309cb51ecfb0bf0012d2ceaff0 (diff)
downloadmaster-187ad058-301948b0495741c3a2cb183fe903ff67a23a3ca7.tar.gz
master-187ad058-301948b0495741c3a2cb183fe903ff67a23a3ca7.tar.bz2
master-187ad058-301948b0495741c3a2cb183fe903ff67a23a3ca7.zip
generic: ar8216: free mib counters from ar8xxx_free
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35545 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy')
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index a7a2a63567..492963de1c 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -1762,7 +1762,6 @@ ar8xxx_mib_cleanup(struct ar8216_priv *priv)
return;
cancel_delayed_work(&priv->mib_work);
- kfree(priv->mib_stats);
}
static struct ar8216_priv *
@@ -1784,6 +1783,7 @@ ar8xxx_create(void)
static void
ar8xxx_free(struct ar8216_priv *priv)
{
+ kfree(priv->mib_stats);
kfree(priv);
}
@@ -1893,7 +1893,7 @@ ar8216_config_init(struct phy_device *pdev)
ret = register_switch(swdev, pdev->attached_dev);
if (ret)
- goto err_cleanup_mib;
+ goto err_free_priv;
printk(KERN_INFO "%s: %s switch driver attached.\n",
pdev->attached_dev->name, swdev->name);
@@ -1924,8 +1924,6 @@ ar8216_config_init(struct phy_device *pdev)
err_unregister_switch:
unregister_switch(&priv->dev);
-err_cleanup_mib:
- ar8xxx_mib_cleanup(priv);
err_free_priv:
ar8xxx_free(priv);
pdev->priv = NULL;