From: Igor Maravic Date: Sun, 12 Aug 2012 22:31:58 +0000 (+0000) Subject: net: ipv6: proc: Fix error handling X-Git-Tag: v3.6-rc3~10^2~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4855d6f3116e891b66198838b683dce3dcf6e874;p=thirdparty%2Flinux.git net: ipv6: proc: Fix error handling Fix error handling in case making of dir dev_snmp6 failes Signed-off-by: Igor Maravic Signed-off-by: David S. Miller --- diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c index da2e92d05c15a..745a320429501 100644 --- a/net/ipv6/proc.c +++ b/net/ipv6/proc.c @@ -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; }