diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2023-01-18 02:02:27 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-01-19 07:52:25 +0300 |
commit | bbd6043f74e139a58052b34df3a4b87da7df00bb (patch) | |
tree | 83f79084d988fc3b07160843ef9cbbf29210be7b /drivers/net/ethernet/freescale/enetc | |
parent | 2c3387109d11690dd7dd91c9c8e497f918f988da (diff) | |
download | linux-bbd6043f74e139a58052b34df3a4b87da7df00bb.tar.xz |
net: enetc: drop redundant enetc_free_tx_frame() call from enetc_free_txbdr()
The call path in enetc_close() is:
enetc_close()
-> enetc_free_rxtx_rings()
-> enetc_free_tx_ring()
-> enetc_free_tx_frame()
-> enetc_free_tx_resources()
-> enetc_free_txbdr()
-> enetc_free_tx_frame()
The enetc_free_tx_frame() function is written such that the second call
exits without doing anything, but nonetheless, it is completely
redundant. Delete it. This makes the TX teardown path more similar to
the RX one, where rx_swbd freeing is done in enetc_free_rx_ring(), not
in enetc_free_rxbdr().
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/freescale/enetc')
-rw-r--r-- | drivers/net/ethernet/freescale/enetc/enetc.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c index f41a02c2213e..94580496ef64 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc.c +++ b/drivers/net/ethernet/freescale/enetc/enetc.c @@ -1773,11 +1773,6 @@ err_alloc_bdr: static void enetc_free_txbdr(struct enetc_bdr *txr) { - int i; - - for (i = 0; i < txr->bd_count; i++) - enetc_free_tx_frame(txr, &txr->tx_swbd[i]); - dma_free_coherent(txr->dev, txr->bd_count * TSO_HEADER_SIZE, txr->tso_headers, txr->tso_headers_dma); txr->tso_headers = NULL; |