diff options
author | Colin Ian King <colin.king@canonical.com> | 2021-01-28 20:59:23 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-02-06 04:43:07 +0300 |
commit | 626899a02e6afcd4b2ce5c0551092e3554cec4aa (patch) | |
tree | 5245443de566a7b0157961a1eef82a3510411189 /net/netfilter | |
parent | 08a01c11a5bb3de9b0a9c9b2685867e50eda9910 (diff) | |
download | linux-626899a02e6afcd4b2ce5c0551092e3554cec4aa.tar.xz |
netfilter: nftables: remove redundant assignment of variable err
The variable err is being assigned a value that is never read,
the same error number is being returned at the error return
path via label err1. Clean up the code by removing the assignment.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/nft_cmp.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/netfilter/nft_cmp.c b/net/netfilter/nft_cmp.c index 3640eea8a87b..eb6a43a180bb 100644 --- a/net/netfilter/nft_cmp.c +++ b/net/netfilter/nft_cmp.c @@ -266,10 +266,8 @@ nft_cmp_select_ops(const struct nft_ctx *ctx, const struct nlattr * const tb[]) if (err < 0) return ERR_PTR(err); - if (desc.type != NFT_DATA_VALUE) { - err = -EINVAL; + if (desc.type != NFT_DATA_VALUE) goto err1; - } if (desc.len <= sizeof(u32) && (op == NFT_CMP_EQ || op == NFT_CMP_NEQ)) return &nft_cmp_fast_ops; |