[PATCH net-next 10/12] net: sparx5: use library helper for freeing tx buffers
From: Daniel Machon
Date: Mon Sep 02 2024 - 10:58:26 EST
The library has the helper fdma_free_phys() for freeing physical FDMA
memory. Use it in the exit path.
Signed-off-by: Daniel Machon <daniel.machon@xxxxxxxxxxxxx>
Reviewed-by: Steen Hegelund <Steen.Hegelund@xxxxxxxxxxxxx>
Reviewed-by: Jens Emil Schulz Østergaard <jensemil.schulzostergaard@xxxxxxxxxxxxx>
Reviewed-by: Horatiu Vultur <horatiu.vultur@xxxxxxxxxxxxx>
---
drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c b/drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c
index 4fc52140752a..38735bac6482 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c
@@ -494,5 +494,6 @@ int sparx5_fdma_stop(struct sparx5 *sparx5)
FDMA_PORT_CTRL_XTR_BUF_IS_EMPTY_GET(val) == 0,
500, 10000, 0, sparx5);
fdma_free_phys(&sparx5->rx.fdma);
+ fdma_free_phys(&sparx5->tx.fdma);
return 0;
}
--
2.34.1