Skip to content

Commit 47f9605

Browse files
Nicolas PitrePaolo Abeni
authored andcommitted
net: ethernet: ti: am65-cpsw: prevent WARN_ON upon module removal
In am65_cpsw_nuss_remove(), move the call to am65_cpsw_unregister_devlink() after am65_cpsw_nuss_cleanup_ndev() to avoid triggering the WARN_ON(devlink_port->type != DEVLINK_PORT_TYPE_NOTSET) in devl_port_unregister(). Makes it coherent with usage in m65_cpsw_nuss_register_ndevs()'s cleanup path. Fixes: 58356eb ("net: ti: am65-cpsw-nuss: Add devlink support") Signed-off-by: Nicolas Pitre <[email protected]> Reviewed-by: Roger Quadros <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 3dc6e99 commit 47f9605

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/ti/am65-cpsw-nuss.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3652,13 +3652,13 @@ static void am65_cpsw_nuss_remove(struct platform_device *pdev)
36523652
return;
36533653
}
36543654

3655-
am65_cpsw_unregister_devlink(common);
36563655
am65_cpsw_unregister_notifiers(common);
36573656

36583657
/* must unregister ndevs here because DD release_driver routine calls
36593658
* dma_deconfigure(dev) before devres_release_all(dev)
36603659
*/
36613660
am65_cpsw_nuss_cleanup_ndev(common);
3661+
am65_cpsw_unregister_devlink(common);
36623662
am65_cpsw_nuss_phylink_cleanup(common);
36633663
am65_cpts_release(common->cpts);
36643664
am65_cpsw_disable_serdes_phy(common);

0 commit comments

Comments
 (0)