diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2013-07-14 21:50:32 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2013-07-14 21:55:01 -0400 |
commit | 8c6ffba0eddc8c110dbf444f51354ce42069abfc (patch) | |
tree | 1055a1cfdf7bd79d6e2c4b969d412780ff2d2209 /net/ipv6 | |
parent | 6e8b8726ad503214ba66e34aed69aff41de33489 (diff) |
PTR_RET is now PTR_ERR_OR_ZERO(): Replace most.
Sweep of the simple cases.
Cc: netdev@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/netfilter/ip6table_filter.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6table_mangle.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6table_nat.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6table_raw.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6table_security.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv6/netfilter/ip6table_filter.c b/net/ipv6/netfilter/ip6table_filter.c index beb5777d2043..29b44b14c5ea 100644 --- a/net/ipv6/netfilter/ip6table_filter.c +++ b/net/ipv6/netfilter/ip6table_filter.c | |||
@@ -61,7 +61,7 @@ static int __net_init ip6table_filter_net_init(struct net *net) | |||
61 | net->ipv6.ip6table_filter = | 61 | net->ipv6.ip6table_filter = |
62 | ip6t_register_table(net, &packet_filter, repl); | 62 | ip6t_register_table(net, &packet_filter, repl); |
63 | kfree(repl); | 63 | kfree(repl); |
64 | return PTR_RET(net->ipv6.ip6table_filter); | 64 | return PTR_ERR_OR_ZERO(net->ipv6.ip6table_filter); |
65 | } | 65 | } |
66 | 66 | ||
67 | static void __net_exit ip6table_filter_net_exit(struct net *net) | 67 | static void __net_exit ip6table_filter_net_exit(struct net *net) |
diff --git a/net/ipv6/netfilter/ip6table_mangle.c b/net/ipv6/netfilter/ip6table_mangle.c index e075399d8b72..c705907ae6ab 100644 --- a/net/ipv6/netfilter/ip6table_mangle.c +++ b/net/ipv6/netfilter/ip6table_mangle.c | |||
@@ -101,7 +101,7 @@ static int __net_init ip6table_mangle_net_init(struct net *net) | |||
101 | net->ipv6.ip6table_mangle = | 101 | net->ipv6.ip6table_mangle = |
102 | ip6t_register_table(net, &packet_mangler, repl); | 102 | ip6t_register_table(net, &packet_mangler, repl); |
103 | kfree(repl); | 103 | kfree(repl); |
104 | return PTR_RET(net->ipv6.ip6table_mangle); | 104 | return PTR_ERR_OR_ZERO(net->ipv6.ip6table_mangle); |
105 | } | 105 | } |
106 | 106 | ||
107 | static void __net_exit ip6table_mangle_net_exit(struct net *net) | 107 | static void __net_exit ip6table_mangle_net_exit(struct net *net) |
diff --git a/net/ipv6/netfilter/ip6table_nat.c b/net/ipv6/netfilter/ip6table_nat.c index 6383f90efda8..9b076d2d3a7b 100644 --- a/net/ipv6/netfilter/ip6table_nat.c +++ b/net/ipv6/netfilter/ip6table_nat.c | |||
@@ -293,7 +293,7 @@ static int __net_init ip6table_nat_net_init(struct net *net) | |||
293 | return -ENOMEM; | 293 | return -ENOMEM; |
294 | net->ipv6.ip6table_nat = ip6t_register_table(net, &nf_nat_ipv6_table, repl); | 294 | net->ipv6.ip6table_nat = ip6t_register_table(net, &nf_nat_ipv6_table, repl); |
295 | kfree(repl); | 295 | kfree(repl); |
296 | return PTR_RET(net->ipv6.ip6table_nat); | 296 | return PTR_ERR_OR_ZERO(net->ipv6.ip6table_nat); |
297 | } | 297 | } |
298 | 298 | ||
299 | static void __net_exit ip6table_nat_net_exit(struct net *net) | 299 | static void __net_exit ip6table_nat_net_exit(struct net *net) |
diff --git a/net/ipv6/netfilter/ip6table_raw.c b/net/ipv6/netfilter/ip6table_raw.c index 60d1bddff7a0..9a626d86720f 100644 --- a/net/ipv6/netfilter/ip6table_raw.c +++ b/net/ipv6/netfilter/ip6table_raw.c | |||
@@ -40,7 +40,7 @@ static int __net_init ip6table_raw_net_init(struct net *net) | |||
40 | net->ipv6.ip6table_raw = | 40 | net->ipv6.ip6table_raw = |
41 | ip6t_register_table(net, &packet_raw, repl); | 41 | ip6t_register_table(net, &packet_raw, repl); |
42 | kfree(repl); | 42 | kfree(repl); |
43 | return PTR_RET(net->ipv6.ip6table_raw); | 43 | return PTR_ERR_OR_ZERO(net->ipv6.ip6table_raw); |
44 | } | 44 | } |
45 | 45 | ||
46 | static void __net_exit ip6table_raw_net_exit(struct net *net) | 46 | static void __net_exit ip6table_raw_net_exit(struct net *net) |
diff --git a/net/ipv6/netfilter/ip6table_security.c b/net/ipv6/netfilter/ip6table_security.c index db155351339c..ce88d1d7e525 100644 --- a/net/ipv6/netfilter/ip6table_security.c +++ b/net/ipv6/netfilter/ip6table_security.c | |||
@@ -58,7 +58,7 @@ static int __net_init ip6table_security_net_init(struct net *net) | |||
58 | net->ipv6.ip6table_security = | 58 | net->ipv6.ip6table_security = |
59 | ip6t_register_table(net, &security_table, repl); | 59 | ip6t_register_table(net, &security_table, repl); |
60 | kfree(repl); | 60 | kfree(repl); |
61 | return PTR_RET(net->ipv6.ip6table_security); | 61 | return PTR_ERR_OR_ZERO(net->ipv6.ip6table_security); |
62 | } | 62 | } |
63 | 63 | ||
64 | static void __net_exit ip6table_security_net_exit(struct net *net) | 64 | static void __net_exit ip6table_security_net_exit(struct net *net) |