summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2021-11-07 21:13:07 +0100
committerDavid S. Miller <davem@davemloft.net>2021-11-07 21:51:17 +0000
commitc45231a7668d6b632534f692b10592ea375b55b0 (patch)
treef7bad1bde9763172f3fa95612eaf44bd02cfdd2e /drivers/net
parent9fec40f850658e00a14a7dd9e06f7fbc7e59cc4a (diff)
litex_liteeth: Fix a double free in the remove function
'netdev' is a managed resource allocated in the probe using 'devm_alloc_etherdev()'. It must not be freed explicitly in the remove function. Fixes: ee7da21ac4c3 ("net: Add driver for LiteX's LiteETH network interface") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/litex/litex_liteeth.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/ethernet/litex/litex_liteeth.c b/drivers/net/ethernet/litex/litex_liteeth.c
index ab9fa1525053..fdd99f0de424 100644
--- a/drivers/net/ethernet/litex/litex_liteeth.c
+++ b/drivers/net/ethernet/litex/litex_liteeth.c
@@ -287,7 +287,6 @@ static int liteeth_remove(struct platform_device *pdev)
struct net_device *netdev = platform_get_drvdata(pdev);
unregister_netdev(netdev);
- free_netdev(netdev);
return 0;
}