Commit 8575258e authored by Luiz Capitulino's avatar Luiz Capitulino Committed by David S. Miller

[IPV4]: Fix route.c build warning when procfs is disabled.

parent 96ab3e2b
...@@ -2779,8 +2779,8 @@ int __init ip_rt_init(void) ...@@ -2779,8 +2779,8 @@ int __init ip_rt_init(void)
ip_rt_max_size = (rt_hash_mask + 1) * 16; ip_rt_max_size = (rt_hash_mask + 1) * 16;
rt_cache_stat = alloc_percpu(struct rt_cache_stat); rt_cache_stat = alloc_percpu(struct rt_cache_stat);
if (!rt_cache_stat) if (!rt_cache_stat)
goto out_enomem1; return -ENOMEM;
devinet_init(); devinet_init();
ip_fib_init(); ip_fib_init();
...@@ -2805,8 +2805,10 @@ int __init ip_rt_init(void) ...@@ -2805,8 +2805,10 @@ int __init ip_rt_init(void)
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
if (!proc_net_fops_create("rt_cache", S_IRUGO, &rt_cache_seq_fops) || if (!proc_net_fops_create("rt_cache", S_IRUGO, &rt_cache_seq_fops) ||
!proc_net_fops_create("rt_cache_stat", S_IRUGO, &rt_cpu_seq_fops)) !proc_net_fops_create("rt_cache_stat", S_IRUGO, &rt_cpu_seq_fops)) {
goto out_enomem; free_percpu(rt_cache_stat);
return -ENOMEM;
}
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_NET_CLS_ROUTE
create_proc_read_entry("rt_acct", 0, proc_net, ip_rt_acct_read, NULL); create_proc_read_entry("rt_acct", 0, proc_net, ip_rt_acct_read, NULL);
...@@ -2816,13 +2818,7 @@ int __init ip_rt_init(void) ...@@ -2816,13 +2818,7 @@ int __init ip_rt_init(void)
xfrm_init(); xfrm_init();
xfrm4_init(); xfrm4_init();
#endif #endif
out:
return rc; return rc;
out_enomem:
free_percpu(rt_cache_stat);
out_enomem1:
rc = -ENOMEM;
goto out;
} }
EXPORT_SYMBOL(__ip_select_ident); EXPORT_SYMBOL(__ip_select_ident);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment