Commit 5f614e6b authored by sjur.brandeland@stericsson.com's avatar sjur.brandeland@stericsson.com Committed by David S. Miller

caif-hsi: Free flip_buffer at shutdown

Fix memory leak of RX flip-buffer.
Signed-off-by: default avatarSjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5c699fb7
...@@ -1210,7 +1210,7 @@ int cfhsi_probe(struct platform_device *pdev) ...@@ -1210,7 +1210,7 @@ int cfhsi_probe(struct platform_device *pdev)
static void cfhsi_shutdown(struct cfhsi *cfhsi) static void cfhsi_shutdown(struct cfhsi *cfhsi)
{ {
u8 *tx_buf, *rx_buf; u8 *tx_buf, *rx_buf, *flip_buf;
/* Stop TXing */ /* Stop TXing */
netif_tx_stop_all_queues(cfhsi->ndev); netif_tx_stop_all_queues(cfhsi->ndev);
...@@ -1234,7 +1234,7 @@ static void cfhsi_shutdown(struct cfhsi *cfhsi) ...@@ -1234,7 +1234,7 @@ static void cfhsi_shutdown(struct cfhsi *cfhsi)
/* Store bufferes: will be freed later. */ /* Store bufferes: will be freed later. */
tx_buf = cfhsi->tx_buf; tx_buf = cfhsi->tx_buf;
rx_buf = cfhsi->rx_buf; rx_buf = cfhsi->rx_buf;
flip_buf = cfhsi->rx_flip_buf;
/* Flush transmit queues. */ /* Flush transmit queues. */
cfhsi_abort_tx(cfhsi); cfhsi_abort_tx(cfhsi);
...@@ -1247,6 +1247,7 @@ static void cfhsi_shutdown(struct cfhsi *cfhsi) ...@@ -1247,6 +1247,7 @@ static void cfhsi_shutdown(struct cfhsi *cfhsi)
/* Free buffers. */ /* Free buffers. */
kfree(tx_buf); kfree(tx_buf);
kfree(rx_buf); kfree(rx_buf);
kfree(flip_buf);
} }
int cfhsi_remove(struct platform_device *pdev) int cfhsi_remove(struct platform_device *pdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment