Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3045915rwe; Mon, 29 Aug 2022 05:05:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR58sQbP+jajoxQ9BWG+kVC791TalR1DKIkCIyGYo9M2hJWSVkBr9sCqmPZi2q8cr5fzD7og X-Received: by 2002:a17:907:e8b:b0:741:4d1a:5955 with SMTP id ho11-20020a1709070e8b00b007414d1a5955mr6431944ejc.2.1661774753276; Mon, 29 Aug 2022 05:05:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661774753; cv=none; d=google.com; s=arc-20160816; b=NSp0WfuAJc2rvvYC8weJImCx6Xd05/r+lm8UWTHapwpEkKcTtlq08b8PZ5FaMU6Eo3 snkLhhBK5OWVuHUyu1eoZsixpCQXAzYC4aeKltYd0aSUndbPt4ju5IGdkwZn6FBK1DqC +ExYJUro5fJx+77+ggDsVHNqNm+UKgj3zZGHcxf8TApx4TrOhvUr7OiTNOFBSdWh8xaH P0osXMFWZtaWpJWeq+QQQlwZmKviTd6A8iGJ911t/9uLB9ruYj4jeOnJlyRbwnh0EXyq 9mr1pmY46OBZdWKLcc9wLMSbAuCbhoa5xoLnL7OI2zQuyv+CMjcGkSPvsXEE40eLtq30 gbkg== 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=+2MiF6F4fWSk6aCcLEaHu9+s/VWNFZnEFDFK1ayWeXU=; b=0+nQxdXeX9khLmDKY8iZ+rtkjB4sp+b9QNE8/vt4AW3ynv7CBkcJ2DygzW4iCHivY1 uWvi5Dgw2SmJdtcaMu1wSF7YtpeMTVZ1MDU8qexnRrkiJBNN6B3G63ouYpn2TQNA6eXT lDpyU0L8zIPB/Fm5rot2+7uPY7AS1e5IfkKFYoey1XKNlbh8gP6JaB+56hzE/+VtpW+0 ueyAfVs2n+fLHRwFQM6GrTEARxXfG76E4CKO0v9dQ3BPPuj/YAd/kY0lWP1/n4VwnLTN oMkpqY/TD8EeRIL6SLIrkgsDtQFQ31C3qVeSeaObTYH7XuY8N1YQ2q4kuVFhzjasrG7I UYNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rfY8xkbQ; 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 dm21-20020a170907949500b0072af6ec8081si7237780ejc.651.2022.08.29.05.05.27; Mon, 29 Aug 2022 05:05:53 -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=rfY8xkbQ; 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 S230449AbiH2LKv (ORCPT + 99 others); Mon, 29 Aug 2022 07:10:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231238AbiH2LJp (ORCPT ); Mon, 29 Aug 2022 07:09: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 350F2647CB; Mon, 29 Aug 2022 04:06:59 -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 9F273B80F10; Mon, 29 Aug 2022 11:06:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02EECC433C1; Mon, 29 Aug 2022 11:06:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661771217; bh=CUlCn9VQFgTQ/9wOrPWdNUeDKrblzrGrdFxsFdpSrlk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rfY8xkbQDqiqwwgSlSLJruL12ke9RRJrKxem8dcqhTXGWdCD+2XH0Je3WVcoD+qUS Mr77rQmWwFQ7JSpyZoGzIoA/qZZwNPu3iDT/Z1OCtf1nXXDTs04t2iTNvwdx0CuliA bQbYKKbIaBnsxPl97n8Flbhgtd3l9HtpXP1BdZLI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jeremy Sowden , Florian Westphal , Sasha Levin Subject: [PATCH 5.10 40/86] netfilter: bitwise: improve error goto labels Date: Mon, 29 Aug 2022 12:59:06 +0200 Message-Id: <20220829105758.194750451@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: Jeremy Sowden [ Upstream commit 00bd435208e5201eb935d273052930bd3b272b6f ] Replace two labels (`err1` and `err2`) with more informative ones. Signed-off-by: Jeremy Sowden Signed-off-by: Florian Westphal Signed-off-by: Sasha Levin --- net/netfilter/nft_bitwise.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/net/netfilter/nft_bitwise.c b/net/netfilter/nft_bitwise.c index 47b0dba95054f..d0c648b64cd40 100644 --- a/net/netfilter/nft_bitwise.c +++ b/net/netfilter/nft_bitwise.c @@ -109,22 +109,23 @@ static int nft_bitwise_init_bool(struct nft_bitwise *priv, return err; if (mask.type != NFT_DATA_VALUE || mask.len != priv->len) { err = -EINVAL; - goto err1; + goto err_mask_release; } err = nft_data_init(NULL, &priv->xor, sizeof(priv->xor), &xor, tb[NFTA_BITWISE_XOR]); if (err < 0) - goto err1; + goto err_mask_release; if (xor.type != NFT_DATA_VALUE || xor.len != priv->len) { err = -EINVAL; - goto err2; + goto err_xor_release; } return 0; -err2: + +err_xor_release: nft_data_release(&priv->xor, xor.type); -err1: +err_mask_release: nft_data_release(&priv->mask, mask.type); return err; } -- 2.35.1