From: Fengguang Wu <fengguang.wu@intel.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Patrick McHardy <kaber@trash.net>,
netfilter-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] netfilter: ipv6: use PTR_RET
Date: Mon, 29 Oct 2012 08:55:42 +0800 [thread overview]
Message-ID: <20121029005542.GA14313@localhost> (raw)
In-Reply-To: <20121029004044.GA12982@localhost>
Use PTR_RET rather than if(IS_ERR(...)) + PTR_ERR
Generated by: coccinelle/api/ptr_ret.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
net/ipv6/netfilter/ip6table_nat.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- linux-next.orig/net/ipv6/netfilter/ip6table_nat.c 2012-10-23 09:44:52.637430993 +0800
+++ linux-next/net/ipv6/netfilter/ip6table_nat.c 2012-10-29 08:53:41.579243556 +0800
@@ -275,9 +275,7 @@ static int __net_init ip6table_nat_net_i
return -ENOMEM;
net->ipv6.ip6table_nat = ip6t_register_table(net, &nf_nat_ipv6_table, repl);
kfree(repl);
- if (IS_ERR(net->ipv6.ip6table_nat))
- return PTR_ERR(net->ipv6.ip6table_nat);
- return 0;
+ return PTR_RET(net->ipv6.ip6table_nat);
}
static void __net_exit ip6table_nat_net_exit(struct net *net)
next prev parent reply other threads:[~2012-10-29 0:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-29 0:40 [PATCH] netfilter: use PTR_RET Fengguang Wu
2012-10-29 0:55 ` Fengguang Wu [this message]
2012-10-29 9:03 ` Pablo Neira Ayuso
2012-10-29 9:13 ` Fengguang Wu
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=20121029005542.GA14313@localhost \
--to=fengguang.wu@intel.com \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@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.