Commit 03c96bc9 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Paolo Abeni
Browse files

net: ethernet: ti: am65-cpsw: avoid devm_alloc_etherdev, fix module removal



Usage of devm_alloc_etherdev_mqs() conflicts with
am65_cpsw_nuss_cleanup_ndev() as the same struct net_device instances
get unregistered twice. Switch to alloc_etherdev_mqs() and make sure
am65_cpsw_nuss_cleanup_ndev() unregisters and frees those net_device
instances properly.

With this, it is finally possible to rmmod the driver without oopsing
the kernel.

Fixes: 93a76530 ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
Signed-off-by: default avatarNicolas Pitre <npitre@baylibre.com>
Reviewed-by: default avatarRoger Quadros <roger@kernel.org>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 47f96054
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment