net: marvell: prestera: fix missed deinit sequence

Add unregister_fib_notifier as rollback of register_fib_notifier.

Fixes: 4394fbcb78 ("net: marvell: prestera: handle fib notifications")
Signed-off-by: Yevhen Orlov <yevhen.orlov@plvision.eu>
Link: https://lore.kernel.org/r/20220710122021.7642-1-yevhen.orlov@plvision.eu
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
Yevhen Orlov 2022-07-10 15:20:21 +03:00 committed by Paolo Abeni
parent 4a46de446d
commit f946964a9f
1 changed files with 1 additions and 0 deletions

View File

@ -588,6 +588,7 @@ err_router_lib_init:
void prestera_router_fini(struct prestera_switch *sw)
{
unregister_fib_notifier(&init_net, &sw->router->fib_nb);
unregister_inetaddr_notifier(&sw->router->inetaddr_nb);
unregister_inetaddr_validator_notifier(&sw->router->inetaddr_valid_nb);
rhashtable_destroy(&sw->router->kern_fib_cache_ht);