Skip to content

Commit

Permalink
ipv4: netfilter: use PTR_RET instead of IS_ERR + PTR_ERR
Browse files Browse the repository at this point in the history
This uses PTR_RET instead of IS_ERR and PTR_ERR in order to increase
readability.

Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Silviu-Mihai Popescu authored and Pablo Neira Ayuso committed Mar 15, 2013
1 parent 2d2fd8c commit 015ba03
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/ipv4/netfilter/arptable_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ static int __net_init arptable_filter_net_init(struct net *net)
net->ipv4.arptable_filter =
arpt_register_table(net, &packet_filter, repl);
kfree(repl);
if (IS_ERR(net->ipv4.arptable_filter))
return PTR_ERR(net->ipv4.arptable_filter);
return 0;
return PTR_RET(net->ipv4.arptable_filter);
}

static void __net_exit arptable_filter_net_exit(struct net *net)
Expand Down

0 comments on commit 015ba03

Please sign in to comment.