]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: sparx5: use library helper for freeing tx buffers
authorDaniel Machon <daniel.machon@microchip.com>
Mon, 2 Sep 2024 14:54:15 +0000 (16:54 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Sep 2024 10:53:50 +0000 (11:53 +0100)
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@microchip.com>
Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com>
Reviewed-by: Jens Emil Schulz Østergaard <jensemil.schulzostergaard@microchip.com>
Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c

index 4fc52140752a1d6141c077f3f7039d8ddc05cefb..38735bac64821a360cf4d791ed581a7111cd6f1f 100644 (file)
@@ -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;
 }