summaryrefslogtreecommitdiffstats
path: root/net/ipv6/netfilter
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2012-10-28 14:40:44 +0000
committerPablo Neira Ayuso <pablo@netfilter.org>2012-10-29 09:59:59 +0100
commit6229b75d8da5a4eed7bb668de757e252986c2305 (patch)
treeaf08d59c44a92032da295afd08d8c044d37fc45b /net/ipv6/netfilter
parent05b4b065a06c3ebacc23ff188e15ea7a278eadc0 (diff)
downloadlinux-6229b75d8da5a4eed7bb668de757e252986c2305.tar.bz2
netfilter: nf_nat: use PTR_RET
Use PTR_RET rather than if(IS_ERR(...)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv6/netfilter')
-rw-r--r--net/ipv6/netfilter/ip6table_nat.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv6/netfilter/ip6table_nat.c b/net/ipv6/netfilter/ip6table_nat.c
index e418bd6350a4..4c8219e94e55 100644
--- a/net/ipv6/netfilter/ip6table_nat.c
+++ b/net/ipv6/netfilter/ip6table_nat.c
@@ -275,9 +275,7 @@ static int __net_init ip6table_nat_net_init(struct net *net)
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)