From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07854C4708A for ; Wed, 30 Nov 2022 18:37:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230398AbiK3ShG (ORCPT ); Wed, 30 Nov 2022 13:37:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230501AbiK3Sg5 (ORCPT ); Wed, 30 Nov 2022 13:36:57 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E94B9491E for ; Wed, 30 Nov 2022 10:36:56 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 266AA61D6F for ; Wed, 30 Nov 2022 18:36:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37EADC433C1; Wed, 30 Nov 2022 18:36:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1669833415; bh=mJuRtBlSOSH9V4fn1nbAYqKgbkqKXm4/LiTyyqj1Mok=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=frQNsZYkLk3cVGcZFa8MPN4A5vvkUflTVVCvXHUuKEcat3pNcbk06ItDfNRl88WSi RcOW8K+wnQV5GSxfltW0YDU1cUnVWZjn0E7oDIkl8CLvYGfhnF3cjE4vqTLpEMVZxT Ck5FRUt3nKURVgv3p30aj3iJTPfJSmdcvsT+qUZA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, YueHaibing , Saeed Mahameed , Antoine Tenart , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.15 097/206] macsec: Fix invalid error code set Date: Wed, 30 Nov 2022 19:22:29 +0100 Message-Id: <20221130180535.503005200@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221130180532.974348590@linuxfoundation.org> References: <20221130180532.974348590@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: YueHaibing [ Upstream commit 7cef6b73fba96abef731a53501924fc3c4a0f947 ] 'ret' is defined twice in macsec_changelink(), when it is set in macsec_is_offloaded case, it will be invalid before return. Fixes: 3cf3227a21d1 ("net: macsec: hardware offloading infrastructure") Signed-off-by: YueHaibing Reviewed-by: Saeed Mahameed Reviewed-by: Antoine Tenart Link: https://lore.kernel.org/r/20221118011249.48112-1-yuehaibing@huawei.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/macsec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c index f1961d7f9db2..aa9d0dfeda5a 100644 --- a/drivers/net/macsec.c +++ b/drivers/net/macsec.c @@ -3808,7 +3808,6 @@ static int macsec_changelink(struct net_device *dev, struct nlattr *tb[], if (macsec_is_offloaded(macsec)) { const struct macsec_ops *ops; struct macsec_context ctx; - int ret; ops = macsec_get_ops(netdev_priv(dev), &ctx); if (!ops) { -- 2.35.1