summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-10-26 17:17:37 +0000
committerGabor Juhos <juhosg@openwrt.org>2009-10-26 17:17:37 +0000
commit941c1dae2c1e06424f9db917fb1af201d84487da (patch)
treeb2cda71792a062811ffe16ea5f38db6296d9b99d /target
parent82cc25d5f0d1b60dd41f8b2c15cd1ec34aff6fe3 (diff)
downloadmtk-20170518-941c1dae2c1e06424f9db917fb1af201d84487da.zip
mtk-20170518-941c1dae2c1e06424f9db917fb1af201d84487da.tar.gz
mtk-20170518-941c1dae2c1e06424f9db917fb1af201d84487da.tar.bz2
ramips: free allocated skbs in ramips_cleanup_dma
SVN-Revision: 18171
Diffstat (limited to 'target')
-rw-r--r--target/linux/ramips/files/drivers/net/ramips.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target/linux/ramips/files/drivers/net/ramips.c b/target/linux/ramips/files/drivers/net/ramips.c
index 3084096..43ccdfc 100644
--- a/target/linux/ramips/files/drivers/net/ramips.c
+++ b/target/linux/ramips/files/drivers/net/ramips.c
@@ -54,6 +54,11 @@ static void
ramips_cleanup_dma(struct net_device *dev)
{
struct raeth_priv *priv = netdev_priv(dev);
+ int i;
+
+ for (i = 0; i < NUM_RX_DESC; i++)
+ if (priv->rx_skb[i])
+ dev_kfree_skb_any(priv->rx_skb[i]);
dma_free_coherent(NULL, NUM_RX_DESC * sizeof(struct ramips_rx_dma),
priv->rx, priv->phy_rx);