Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3057286rwe; Mon, 29 Aug 2022 05:15:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR7v3GCpKB8/rOxQsSdF24+wNANt0VAMmZytDZrS6Q/mk+/g4shFS5cNhwcdGFXrXMf+SS9F X-Received: by 2002:a17:90a:e586:b0:1fa:d28b:ab9b with SMTP id g6-20020a17090ae58600b001fad28bab9bmr18435518pjz.47.1661775328774; Mon, 29 Aug 2022 05:15:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661775328; cv=none; d=google.com; s=arc-20160816; b=y2ZrQp+XrWKkkT9wurV40I6huyVcy0lNSSZcw22bcvbf/bYDRV9Ybhe/ELTcgwpqAj +FFb4UF2nNKsh0i3WcGMrCZAtwQ7W+/xYe5q8JPS3g4BD3kDQbK9F7Nn+mltoWN/RLf7 KRBAtGy2V+3JwicT8iwtljrcOC/PRtOwxCJHN7NFLAYA2oobVosdCgej4gLlh02MFeCs u3H0sAMMyvEMj00zZHGqVxW8DCYtDocp8xjhcaz2VgIoeez85tFxM1PTfQhQyzEomHul j92orIcyIcdG8dkWgfIu+bYLrovXnvZaT70s3O2QBMvG/DXl8WWEYcyQdtpAi7tFVtU6 dLCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+dF59To2YfB2e1zXWbpswnileIPowMLvSDXlLZNM9CI=; b=fbwRf+YdeVCTgdgT71jIaWXpi/Ky6o0Qd1nD0qk8ClGQ85pfsnfrBd4bc722DtS2Q2 AKmWntiI9/dXlMVUzFkRSfq63EP0Kzc5+Ng2xxSgFMFFrUoWMKA9zUwqgveTtXGfU7HY RJaEbtJcN4ZUGX+tPV828/jtRWkImHqEwyf8hHthZprCEg/efjD2mN5X0Yw06AioEG0k PznusNI7yzvP+b/pTNVptIEFUwuyxTtahajPg7U6gZAS3AvMvITAzGH2pD6oBz6UAS// KpfKLhiTlj0Fx4AjXHLRz7sH1JAl1Bn3gBu798WjHVkdV4t6xDdIjiLbiaa4OgkmWWew MZ9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DQJ94GVu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l9-20020a170903244900b001714352fc52si9609145pls.315.2022.08.29.05.15.17; Mon, 29 Aug 2022 05:15:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DQJ94GVu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233067AbiH2LtR (ORCPT + 99 others); Mon, 29 Aug 2022 07:49:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233141AbiH2Lsp (ORCPT ); Mon, 29 Aug 2022 07:48:45 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF96E7A76A; Mon, 29 Aug 2022 04:32:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DA7A2B80EFF; Mon, 29 Aug 2022 11:06:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47CD4C433C1; Mon, 29 Aug 2022 11:06:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661771187; bh=a34mquwvDNCmths7L3NcKqLffOA6hamfkB0VPZqZCPE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DQJ94GVu6uhkSKYe5okZdqHNn/325Gs0DGQWwQAEcZn7I2IQF4jJeAxXUuxBb0clT 84ZpVNfw/jPQUFsnz6v51PlyOfswnqAnFHFwZLqlKJM7FotkZ6+HBfqTwwMN8qhl6y E581YI78D1gxHaIQyNOK+35weCYiE1Gg+BLQ09LE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Colin Ian King , Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 5.10 37/86] netfilter: nftables: remove redundant assignment of variable err Date: Mon, 29 Aug 2022 12:59:03 +0200 Message-Id: <20220829105758.084347625@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220829105756.500128871@linuxfoundation.org> References: <20220829105756.500128871@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King [ Upstream commit 626899a02e6afcd4b2ce5c0551092e3554cec4aa ] 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 Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin --- net/netfilter/nft_cmp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/netfilter/nft_cmp.c b/net/netfilter/nft_cmp.c index b529c0e865466..47b6d05f1ae69 100644 --- a/net/netfilter/nft_cmp.c +++ b/net/netfilter/nft_cmp.c @@ -303,10 +303,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; -- 2.35.1