]> git.hungrycats.org Git - linux/commitdiff
[IPV4]: Fix route.c build warning when procfs is disabled.
authorLuiz Capitulino <lcapitulino@prefeitura.sp.gov.br>
Tue, 7 Oct 2003 00:54:23 +0000 (17:54 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Tue, 7 Oct 2003 00:54:23 +0000 (17:54 -0700)
net/ipv4/route.c

index fc169899e43660b4833369a1b34d094627c4a356..5dc5e3f426f0a5e8a21fa3fcdfb7e736a03816c9 100644 (file)
@@ -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);