[NETFILTER]: pptp helper: propagate errors instead of using -EIO in init functions Signed-off-by: Patrick McHardy --- commit b806b1f4d971bfb3bd348a7d8d9029b6b5c9c23b tree 66c4408681361eeefe21d43ccf27ec65a307753e parent fb3d5fc64859ad4ebe99cff3c318f53cdf72b0e8 author Patrick McHardy Thu, 15 Sep 2005 22:26:07 +0200 committer Patrick McHardy Thu, 15 Sep 2005 22:26:07 +0200 net/ipv4/netfilter/ip_conntrack_helper_pptp.c | 2 +- net/ipv4/netfilter/ip_conntrack_proto_gre.c | 10 +--------- net/ipv4/netfilter/ip_nat_proto_gre.c | 5 +---- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/net/ipv4/netfilter/ip_conntrack_helper_pptp.c b/net/ipv4/netfilter/ip_conntrack_helper_pptp.c --- a/net/ipv4/netfilter/ip_conntrack_helper_pptp.c +++ b/net/ipv4/netfilter/ip_conntrack_helper_pptp.c @@ -777,7 +777,7 @@ static int __init init(void) printk(KERN_ERR "Unable to register conntrack application " "helper for pptp: %d\n", retcode); ip_ct_proto_gre_fini(); - return -EIO; + return retcode; } printk("ip_conntrack_pptp version %s loaded\n", IP_CT_PPTP_VERSION); diff --git a/net/ipv4/netfilter/ip_conntrack_proto_gre.c b/net/ipv4/netfilter/ip_conntrack_proto_gre.c --- a/net/ipv4/netfilter/ip_conntrack_proto_gre.c +++ b/net/ipv4/netfilter/ip_conntrack_proto_gre.c @@ -323,15 +323,7 @@ static struct ip_conntrack_protocol gre /* ip_conntrack_proto_gre initialization */ int __init ip_ct_proto_gre_init(void) { - int retcode; - - if ((retcode = ip_conntrack_protocol_register(&gre))) { - printk(KERN_ERR "Unable to register conntrack protocol " - "helper for gre: %d\n", retcode); - return -EIO; - } - - return 0; + return ip_conntrack_protocol_register(&gre); } void __exit ip_ct_proto_gre_fini(void) diff --git a/net/ipv4/netfilter/ip_nat_proto_gre.c b/net/ipv4/netfilter/ip_nat_proto_gre.c --- a/net/ipv4/netfilter/ip_nat_proto_gre.c +++ b/net/ipv4/netfilter/ip_nat_proto_gre.c @@ -204,10 +204,7 @@ static struct ip_nat_protocol gre = { int __init ip_nat_proto_gre_init(void) { - if (ip_nat_protocol_register(&gre)) - return -EIO; - - return 0; + return ip_nat_protocol_register(&gre); } void __exit ip_nat_proto_gre_fini(void)