diff --git a/net/ipv6/seg6.c b/net/ipv6/seg6.c index 846c3abbcfb4..03090d1419d0 100644 --- a/net/ipv6/seg6.c +++ b/net/ipv6/seg6.c @@ -546,6 +546,8 @@ out_unregister_iptun: #endif #ifdef CONFIG_IPV6_SEG6_LWTUNNEL out_unregister_genl: +#endif +#if IS_ENABLED(CONFIG_IPV6_SEG6_LWTUNNEL) || IS_ENABLED(CONFIG_IPV6_SEG6_HMAC) genl_unregister_family(&seg6_genl_family); #endif out_unregister_pernet: