net: ethernet: ti: am65-cpsw: fix error handling in am65_cpsw_nuss_probe()
[ Upstream commit 46fb6512 ] The am65_cpsw_nuss_cleanup_ndev() function calls unregister_netdev() even if register_netdev() fails, which triggers WARN_ON(1) in unregister_netdevice_many(). To fix it, make sure that unregister_netdev() is called only on registered netdev. Compile tested only. Fixes: 84b4aa49 ("net: ethernet: ti: am65-cpsw: add multi port support in mac-only mode") Signed-off-by:Zhang Changzhong <zhangchangzhong@huawei.com> Reviewed-by:
Maciej Fijalkowski <maciej.fijalkowski@intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Sasha Levin <sashal@kernel.org>
parent
eaa57225
Please register or sign in to comment