net: marvell: prestera: fix missed deinit sequence
authorYevhen Orlov <yevhen.orlov@plvision.eu>
Sun, 10 Jul 2022 12:20:21 +0000 (15:20 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 12 Jul 2022 10:17:04 +0000 (12:17 +0200)
Add unregister_fib_notifier as rollback of register_fib_notifier.

Fixes: 4394fbcb78cf ("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>
drivers/net/ethernet/marvell/prestera/prestera_router.c

index 3754d8a..3c8116f 100644 (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);