Commit c45231a7 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by David S. Miller
Browse files

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: ee7da21a ("net: Add driver for LiteX's LiteETH network interface")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9fec40f8
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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;
}