litex_liteeth: Fix a double free in the remove function
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 7 Nov 2021 20:13:07 +0000 (21:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:17:10 +0000 (19:17 +0100)
commit2d57d522e2f0354b8fba529e204455e558866316
treef007aae9c902a8ce68e8fb6151a4e500956019a0
parent2d2dfc33ef4437fe0823ad666e51bf0eeea4a926
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>
drivers/net/ethernet/litex/litex_liteeth.c