Skip to contentSkip to conversation

6lowpan: reassembly: fix return of init function

PATCH Applied Alexander Aring 2 participants 2 messages Mar 7, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 6lowpan: reassembly: fix return of init function

This patch adds a missing return after fragmentation init. Otherwise we register a sysctl interface and deregister it afterwards which makes no sense.

---
Changes since v2:
- remove goto out label and use return ret instead.

 net/ieee802154/reassembly.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
net/ieee802154/reassembly.c +3 -2
index 1cc2336..bf06492 100644
@@ -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;
 }
 
Signature · 9 lines
1.9.0


------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
maintainer Applied
#1 lore raw

From: Alexander Aring <[email protected]>
Date: Fri, 7 Mar 2014 11:06:54 +0100

Quoted 8 lines

This patch adds a missing return after fragmentation init. Otherwise we register a sysctl interface and deregister it afterwards which makes no sense.

---
Changes since v2:
- remove goto out label and use return ret instead.

Applied, thanks.