All of lore.kernel.org
 help / color / mirror / Atom feed
* [NETFILTER 1/8]: pptp helper: propagate errors instead of using -EIO in init functions
@ 2005-09-15 22:44 Patrick McHardy
  0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2005-09-15 22:44 UTC (permalink / raw)
  To: Harald Welte; +Cc: Netfilter Development Mailinglist, David S. Miller

[-- Attachment #1: 01.diff --]
[-- Type: text/x-patch, Size: 2268 bytes --]

[NETFILTER]: pptp helper: propagate errors instead of using -EIO in init functions

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit b806b1f4d971bfb3bd348a7d8d9029b6b5c9c23b
tree 66c4408681361eeefe21d43ccf27ec65a307753e
parent fb3d5fc64859ad4ebe99cff3c318f53cdf72b0e8
author Patrick McHardy <kaber@trash.net> Thu, 15 Sep 2005 22:26:07 +0200
committer Patrick McHardy <kaber@trash.net> 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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-09-15 22:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-15 22:44 [NETFILTER 1/8]: pptp helper: propagate errors instead of using -EIO in init functions Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.