6lowpan: reassembly: fix return of init function
authorAlexander Aring <alex.aring@gmail.com>
Fri, 7 Mar 2014 10:06:54 +0000 (11:06 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 7 Mar 2014 22:11:19 +0000 (17:11 -0500)
This patch adds a missing return after fragmentation init. Otherwise we
register a sysctl interface and deregister it afterwards which makes no
sense.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ieee802154/reassembly.c

index 1cc2336eb52c1be285e8db86cc9d97b8f2212f41..bf06492e7d192463f706ab49d71b0584af20739e 100644 (file)
@@ -535,7 +535,7 @@ int __init lowpan_net_frag_init(void)
 
        ret = lowpan_frags_sysctl_register();
        if (ret)
-               goto out;
+               return ret;
 
        ret = register_pernet_subsys(&lowpan_frags_ops);
        if (ret)
@@ -550,9 +550,10 @@ int __init lowpan_net_frag_init(void)
        lowpan_frags.frag_expire = lowpan_frag_expire;
        lowpan_frags.secret_interval = 10 * 60 * HZ;
        inet_frags_init(&lowpan_frags);
+
+       return ret;
 err_pernet:
        lowpan_frags_sysctl_unregister();
-out:
        return ret;
 }