Message ID | 20210128175923.645865-1-colin.king@canonical.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | netfilter: nf_tables: remove redundant assignment of variable err | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Guessed tree name to be net-next |
netdev/subject_prefix | warning | Target tree name not specified in the subject |
netdev/cc_maintainers | success | CCed 8 of 8 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 1 this patch: 1 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 11 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 1 this patch: 1 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
On Thu, Jan 28, 2021 at 05:59:23PM +0000, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > 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. Applied to nf, thanks.
On Thu, Feb 04, 2021 at 12:04:21AM +0100, Pablo Neira Ayuso wrote: > On Thu, Jan 28, 2021 at 05:59:23PM +0000, Colin King wrote: > > From: Colin Ian King <colin.king@canonical.com> > > > > 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. > > Applied to nf, thanks. Sorry, I meant, nf-next
diff --git a/net/netfilter/nft_cmp.c b/net/netfilter/nft_cmp.c index 00e563a72d3d..acbabffefebb 100644 --- a/net/netfilter/nft_cmp.c +++ b/net/netfilter/nft_cmp.c @@ -268,10 +268,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;