diff options
author | David S. Miller <davem@davemloft.net> | 2016-12-07 03:33:19 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-07 03:33:19 +0100 |
commit | c63d352f053a788281eb90df0a71cd3a6b2c4040 (patch) | |
tree | ce0c6f0993100d3d8feda1d9d487dfba4abc5bd0 /drivers/net/ethernet/cirrus | |
parent | net: hns: Fix to conditionally convey RX checksum flag to stack (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc (diff) | |
download | linux-c63d352f053a788281eb90df0a71cd3a6b2c4040.tar.xz linux-c63d352f053a788281eb90df0a71cd3a6b2c4040.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/net/ethernet/cirrus')
-rw-r--r-- | drivers/net/ethernet/cirrus/ep93xx_eth.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cirrus/ep93xx_eth.c b/drivers/net/ethernet/cirrus/ep93xx_eth.c index 9119af088821..a1de0d12927d 100644 --- a/drivers/net/ethernet/cirrus/ep93xx_eth.c +++ b/drivers/net/ethernet/cirrus/ep93xx_eth.c @@ -468,6 +468,9 @@ static void ep93xx_free_buffers(struct ep93xx_priv *ep) struct device *dev = ep->dev->dev.parent; int i; + if (!ep->descs) + return; + for (i = 0; i < RX_QUEUE_ENTRIES; i++) { dma_addr_t d; @@ -490,6 +493,7 @@ static void ep93xx_free_buffers(struct ep93xx_priv *ep) dma_free_coherent(dev, sizeof(struct ep93xx_descs), ep->descs, ep->descs_dma_addr); + ep->descs = NULL; } static int ep93xx_alloc_buffers(struct ep93xx_priv *ep) |