aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/fib6_rules.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index 428c6b0e26d8..9ce2e0a6748a 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -265,10 +265,23 @@ static int __init fib6_default_rules_init(void)
265 return 0; 265 return 0;
266} 266}
267 267
268void __init fib6_rules_init(void) 268int __init fib6_rules_init(void)
269{ 269{
270 BUG_ON(fib6_default_rules_init()); 270 int ret;
271 fib_rules_register(&fib6_rules_ops); 271
272 ret = fib6_default_rules_init();
273 if (ret)
274 goto out;
275
276 ret = fib_rules_register(&fib6_rules_ops);
277 if (ret)
278 goto out_default_rules_init;
279out:
280 return ret;
281
282out_default_rules_init:
283 fib_rules_cleanup_ops(&fib6_rules_ops);
284 goto out;
272} 285}
273 286
274void fib6_rules_cleanup(void) 287void fib6_rules_cleanup(void)