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)
ip_rt_max_size = (rt_hash_mask + 1) * 16;
rt_cache_stat = alloc_percpu(struct rt_cache_stat);
if (!rt_cache_stat)
goto out_enomem1;
if (!rt_cache_stat)
return -ENOMEM;
devinet_init();
ip_fib_init();
......@@ -2805,8 +2805,10 @@ int __init ip_rt_init(void)
#ifdef CONFIG_PROC_FS
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))
goto out_enomem;
!proc_net_fops_create("rt_cache_stat", S_IRUGO, &rt_cpu_seq_fops)) {
free_percpu(rt_cache_stat);
return -ENOMEM;
}
#ifdef CONFIG_NET_CLS_ROUTE
create_proc_read_entry("rt_acct", 0, proc_net, ip_rt_acct_read, NULL);
......@@ -2816,13 +2818,7 @@ int __init ip_rt_init(void)
xfrm_init();
xfrm4_init();
#endif
out:
return rc;
out_enomem:
free_percpu(rt_cache_stat);
out_enomem1:
rc = -ENOMEM;
goto out;
}
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