summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLendacky, Thomas <Thomas.Lendacky@amd.com>2014-11-06 23:02:13 (GMT)
committerDavid S. Miller <davem@davemloft.net>2014-11-07 00:00:15 (GMT)
commite98c72c94205c59745f9ed0ac2837d5b83084a46 (patch)
treeb441cd6b39be96e098cdb7f6fc988de838de70e0 /drivers
parent6b798d70d07a38e9ba0a32316f76495f9dcfc343 (diff)
downloadlinux-e98c72c94205c59745f9ed0ac2837d5b83084a46.tar.xz
amd-xgbe: Free channel/ring structures later
The channel structure is freed before freeing the per channel interrupts resulting in a kernel oops. Move the call to free the channel structure to after the freeing of the per channel interrupts. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/amd/xgbe/xgbe-drv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
index ced9f52..ec5fff3 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
@@ -1369,9 +1369,6 @@ static int xgbe_close(struct net_device *netdev)
/* Free the ring descriptors and buffers */
desc_if->free_ring_resources(pdata);
- /* Free the channel and ring structures */
- xgbe_free_channels(pdata);
-
/* Release the interrupts */
devm_free_irq(pdata->dev, pdata->dev_irq, pdata);
if (pdata->per_channel_irq) {
@@ -1380,6 +1377,9 @@ static int xgbe_close(struct net_device *netdev)
devm_free_irq(pdata->dev, channel->dma_irq, channel);
}
+ /* Free the channel and ring structures */
+ xgbe_free_channels(pdata);
+
/* Disable the clocks */
clk_disable_unprepare(pdata->ptpclk);
clk_disable_unprepare(pdata->sysclk);