diff options
Diffstat (limited to 'net/ipv4/proc.c')
-rw-r--r-- | net/ipv4/proc.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c index 120e1f7461da..554390431a4e 100644 --- a/net/ipv4/proc.c +++ b/net/ipv4/proc.c | |||
@@ -508,7 +508,7 @@ static const struct file_operations netstat_seq_fops = { | |||
508 | static __net_init int ip_proc_init_net(struct net *net) | 508 | static __net_init int ip_proc_init_net(struct net *net) |
509 | { | 509 | { |
510 | if (!proc_net_fops_create(net, "sockstat", S_IRUGO, &sockstat_seq_fops)) | 510 | if (!proc_net_fops_create(net, "sockstat", S_IRUGO, &sockstat_seq_fops)) |
511 | return -ENOMEM; | 511 | goto out_sockstat; |
512 | if (!proc_net_fops_create(net, "netstat", S_IRUGO, &netstat_seq_fops)) | 512 | if (!proc_net_fops_create(net, "netstat", S_IRUGO, &netstat_seq_fops)) |
513 | goto out_netstat; | 513 | goto out_netstat; |
514 | if (!proc_net_fops_create(net, "snmp", S_IRUGO, &snmp_seq_fops)) | 514 | if (!proc_net_fops_create(net, "snmp", S_IRUGO, &snmp_seq_fops)) |
@@ -520,6 +520,7 @@ out_snmp: | |||
520 | proc_net_remove(net, "netstat"); | 520 | proc_net_remove(net, "netstat"); |
521 | out_netstat: | 521 | out_netstat: |
522 | proc_net_remove(net, "sockstat"); | 522 | proc_net_remove(net, "sockstat"); |
523 | out_sockstat: | ||
523 | return -ENOMEM; | 524 | return -ENOMEM; |
524 | } | 525 | } |
525 | 526 | ||
@@ -537,16 +538,6 @@ static __net_initdata struct pernet_operations ip_proc_ops = { | |||
537 | 538 | ||
538 | int __init ip_misc_proc_init(void) | 539 | int __init ip_misc_proc_init(void) |
539 | { | 540 | { |
540 | int rc = 0; | 541 | return register_pernet_subsys(&ip_proc_ops); |
541 | |||
542 | if (register_pernet_subsys(&ip_proc_ops)) | ||
543 | goto out_pernet; | ||
544 | |||
545 | out: | ||
546 | return rc; | ||
547 | |||
548 | out_pernet: | ||
549 | rc = -ENOMEM; | ||
550 | goto out; | ||
551 | } | 542 | } |
552 | 543 | ||