Commit 5e6bc34f authored by Neil Horman's avatar Neil Horman Committed by David S. Miller

[SCTP] Fix bug in sctp_init() error handling code.

Signed-off-by: default avatarNeil Horman <nhorman@redhat.com>
Signed-off-by: default avatarSridhar Samudrala <sri@us.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b9b9e10f
...@@ -1159,8 +1159,6 @@ SCTP_STATIC __init int sctp_init(void) ...@@ -1159,8 +1159,6 @@ SCTP_STATIC __init int sctp_init(void)
status = 0; status = 0;
out: out:
return status; return status;
err_add_protocol:
proto_unregister(&sctp_prot);
err_ctl_sock_init: err_ctl_sock_init:
sctp_v6_exit(); sctp_v6_exit();
err_v6_init: err_v6_init:
...@@ -1188,6 +1186,8 @@ err_bucket_cachep: ...@@ -1188,6 +1186,8 @@ err_bucket_cachep:
inet_del_protocol(&sctp_protocol, IPPROTO_SCTP); inet_del_protocol(&sctp_protocol, IPPROTO_SCTP);
inet_unregister_protosw(&sctp_seqpacket_protosw); inet_unregister_protosw(&sctp_seqpacket_protosw);
inet_unregister_protosw(&sctp_stream_protosw); inet_unregister_protosw(&sctp_stream_protosw);
err_add_protocol:
proto_unregister(&sctp_prot);
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment