All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Harald Welte <laforge@netfilter.org>
Cc: Netfilter Development Mailinglist
	<netfilter-devel@lists.netfilter.org>,
	"David S. Miller" <davem@davemloft.net>
Subject: [NETFILTER 1/8]: pptp helper: propagate errors instead of using -EIO in init functions
Date: Fri, 16 Sep 2005 00:44:36 +0200	[thread overview]
Message-ID: <4329F954.2090309@trash.net> (raw)

[-- 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)

                 reply	other threads:[~2005-09-15 22:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4329F954.2090309@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=laforge@netfilter.org \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.