From: Olaf Kirch Date: Wed, 27 Sep 2006 23:33:45 +0000 (-0700) Subject: [IPV4]: Fix order in inet_init failure path. X-Git-Tag: v2.6.19-rc1~858^2~88 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=321efff7c3b7a26fa0522cb12b2af2ac82c05f1e;p=platform%2Fkernel%2Flinux-exynos.git [IPV4]: Fix order in inet_init failure path. 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 Signed-off-by: David S. Miller --- diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 250a02b..ea58448 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -1342,10 +1342,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; }