Subject: [PATCH] Fix order in inet_init failure path.

From: Olaf Kirch <[email-masked]>
Date: Tue, 26 Sep 2006 16:17:09 +0200

This is just a minor buglet I came across by accident - when inet_init
fails to register raw_prot, it jumps to out_unregister_udp_proto which
should unregister UDP _and_ TCP.

Signed-off-by: Olaf Kirch <[email-masked]>

 net/ipv4/af_inet.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Index: build/net/ipv4/af_inet.c
===================================================================
--- build.orig/net/ipv4/af_inet.c
+++ build/net/ipv4/af_inet.c
@@ -1345,10 +1345,10 @@ static int __init inet_init(void)
 	rc = 0;
 out:
 	return rc;
-out_unregister_tcp_proto:
-	proto_unregister(&tcp_prot);
 out_unregister_udp_proto:
 	proto_unregister(&udp_prot);
+out_unregister_tcp_proto:
+	proto_unregister(&tcp_prot);
 	goto out;
 }

-- 
Olaf Kirch   |  --- o --- Nous sommes du soleil we love when we play
[email-masked] |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax