diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2014-11-18 19:37:05 (GMT) |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-11-20 12:08:43 (GMT) |
commit | 982f405136a44754e884184d24b70d2d4cefcb7a (patch) | |
tree | 859f3fc225ed106392df89500c2deac8de57326d /net/netfilter/nf_tables_api.c | |
parent | 2c7b5d5dac0ddaa4e1109fb84dbbe91db3c6c6e5 (diff) | |
download | linux-982f405136a44754e884184d24b70d2d4cefcb7a.tar.xz |
netfilter: Deletion of unnecessary checks before two function calls
The functions free_percpu() and module_put() test whether their argument
is NULL and then return immediately. Thus the test around the call is
not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Julian Anastasov <ja@ssi.bg>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_tables_api.c')
-rw-r--r-- | net/netfilter/nf_tables_api.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 1ffb253..18a9dae 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -3674,8 +3674,7 @@ static int nf_tables_abort(struct sk_buff *skb) break; case NFT_MSG_NEWCHAIN: if (nft_trans_chain_update(trans)) { - if (nft_trans_chain_stats(trans)) - free_percpu(nft_trans_chain_stats(trans)); + free_percpu(nft_trans_chain_stats(trans)); nft_trans_destroy(trans); } else { |