From: Neil Horman Date: Thu, 28 Apr 2005 18:59:49 +0000 (-0700) Subject: [SCTP] Fix bug in sctp_init() error handling code. X-Git-Tag: v2.6.12-rc4~189 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e6bc34f86e450ff14c4817902d66aa9c786bc06;p=linux-2.6 [SCTP] Fix bug in sctp_init() error handling code. Signed-off-by: Neil Horman Signed-off-by: Sridhar Samudrala Signed-off-by: David S. Miller --- diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index b9813cf3d9..23c85a236c 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c @@ -1159,8 +1159,6 @@ SCTP_STATIC __init int sctp_init(void) status = 0; out: return status; -err_add_protocol: - proto_unregister(&sctp_prot); err_ctl_sock_init: sctp_v6_exit(); err_v6_init: @@ -1188,6 +1186,8 @@ err_bucket_cachep: inet_del_protocol(&sctp_protocol, IPPROTO_SCTP); inet_unregister_protosw(&sctp_seqpacket_protosw); inet_unregister_protosw(&sctp_stream_protosw); +err_add_protocol: + proto_unregister(&sctp_prot); goto out; }