net: ipv6: proc: Fix error handling
authorIgor Maravic <igorm@etf.rs>
Sun, 12 Aug 2012 22:31:58 +0000 (22:31 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Aug 2012 21:45:07 +0000 (14:45 -0700)
Fix error handling in case making of dir dev_snmp6 failes

Signed-off-by: Igor Maravic <igorm@etf.rs>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/proc.c

index da2e92d..745a320 100644 (file)
@@ -307,10 +307,10 @@ static int __net_init ipv6_proc_init_net(struct net *net)
                goto proc_dev_snmp6_fail;
        return 0;
 
+proc_dev_snmp6_fail:
+       proc_net_remove(net, "snmp6");
 proc_snmp6_fail:
        proc_net_remove(net, "sockstat6");
-proc_dev_snmp6_fail:
-       proc_net_remove(net, "dev_snmp6");
        return -ENOMEM;
 }