funeth: unregister devlink port after netdevice unregister

Fix the order of destroy_netdev() flow and unregister the devlink port
after calling unregister_netdev().

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jiri Pirko 2022-09-26 13:09:36 +02:00 committed by Jakub Kicinski
parent 73dfe93ea1
commit dfe6094914
1 changed files with 1 additions and 1 deletions

View File

@ -1829,8 +1829,8 @@ static void fun_destroy_netdev(struct net_device *netdev)
fp = netdev_priv(netdev); fp = netdev_priv(netdev);
devlink_port_type_clear(&fp->dl_port); devlink_port_type_clear(&fp->dl_port);
devlink_port_unregister(&fp->dl_port);
unregister_netdev(netdev); unregister_netdev(netdev);
devlink_port_unregister(&fp->dl_port);
fun_ktls_cleanup(fp); fun_ktls_cleanup(fp);
fun_free_stats_area(fp); fun_free_stats_area(fp);
fun_free_rss(fp); fun_free_rss(fp);