diff options
Diffstat (limited to 'net/ipv6/ip6_fib.c')
-rw-r--r-- | net/ipv6/ip6_fib.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 31b60a02512a..c100b44f2b87 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c | |||
@@ -1473,16 +1473,24 @@ void fib6_run_gc(unsigned long dummy) | |||
1473 | spin_unlock_bh(&fib6_gc_lock); | 1473 | spin_unlock_bh(&fib6_gc_lock); |
1474 | } | 1474 | } |
1475 | 1475 | ||
1476 | void __init fib6_init(void) | 1476 | int __init fib6_init(void) |
1477 | { | 1477 | { |
1478 | int ret; | ||
1478 | fib6_node_kmem = kmem_cache_create("fib6_nodes", | 1479 | fib6_node_kmem = kmem_cache_create("fib6_nodes", |
1479 | sizeof(struct fib6_node), | 1480 | sizeof(struct fib6_node), |
1480 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, | 1481 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, |
1481 | NULL); | 1482 | NULL); |
1482 | |||
1483 | fib6_tables_init(); | 1483 | fib6_tables_init(); |
1484 | 1484 | ||
1485 | __rtnl_register(PF_INET6, RTM_GETROUTE, NULL, inet6_dump_fib); | 1485 | ret = __rtnl_register(PF_INET6, RTM_GETROUTE, NULL, inet6_dump_fib); |
1486 | if (ret) | ||
1487 | goto out_kmem_cache_create; | ||
1488 | out: | ||
1489 | return ret; | ||
1490 | |||
1491 | out_kmem_cache_create: | ||
1492 | kmem_cache_destroy(fib6_node_kmem); | ||
1493 | goto out; | ||
1486 | } | 1494 | } |
1487 | 1495 | ||
1488 | void fib6_gc_cleanup(void) | 1496 | void fib6_gc_cleanup(void) |