litex_liteeth: Fix a double free in the remove function
[ Upstream commit c45231a7668d6b632534f692b10592ea375b55b0 ] '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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
2d2dfc33ef
commit
2d57d522e2
@ -289,7 +289,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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user