Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp316413rwb; Fri, 18 Nov 2022 01:42:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf5kouhPHW6qR11qIVf7W/+VXm7J8Qrn4a7UfSc5hLfq/+D35mriq3r0L+TCeeuisPriHomw X-Received: by 2002:a17:902:820e:b0:186:a97d:6bc8 with SMTP id x14-20020a170902820e00b00186a97d6bc8mr6869489pln.101.1668764571949; Fri, 18 Nov 2022 01:42:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668764571; cv=none; d=google.com; s=arc-20160816; b=YcNMNrO+TTW1SsIpdbiS5x5t9qKMw6RJuNfuAb4AnlSa4mZG+l3WZwsLpRBVcYTfCw +5P5O/+8w2SpHh9l1suuMdXwqfP6KODCc/vnAqIxdOqBTpQhoeA9pXMJ42bybXGIcqgw p9xSWR0wfz3r6pRjEU1Erk30w1cBDHlzqJGa3IKGlq8x6G416SBfV3MV5RubNPlhIpR0 TjCMXHLSScPXG2DUORnZumXLbFMmwYhIJUvmb3utqP/02S6zzGLFMg3UZn5jwZcSGkcg yldbL3VmDLEtuj4GJJxFsE6YYMqy1tLTNAZWqDlS2quKwunjNU15CEQATbY/Jnf/1mwU 8Vhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:to:cc:from:subject:references :in-reply-to:content-transfer-encoding:mime-version:dkim-signature; bh=mRwT2KBBRoxX7q07bWbMHrS4d2d1Aonms3sbVxadmio=; b=xh13b2/RNceg2/tFrQGQXENmXgJjiHZ/b0DbZFCInMjYIk0r7ys3U8O3DlXbj45OA+ 4eFzD2Xa9ZZdlHn4KoKa2fxtxhH+41QeAaw1QcyiOwQbbJaBNBwiJYdwoKJA79t/KEl+ 06N/NuRtKL7PAintFTsjVqxfoC9bRbvhSD0Z5UUgm1WJMgkdPoW9CZkGEv6ek1b/8BDJ ikN42jLxEu80S7CT2SaKWaupUZd5OloLxr3QcyEc/q149voHWXmqKgEJ9U+WR4VtdHiH NeVN89q2jrnXXNNsgSVvAT/DM7nHOAJ3vu1apIUaCXyWyGK1PeVyrYHMmKo+ShzuPth0 xNdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CNjYfCGv; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u14-20020a17090341ce00b00186b76f4655si3785925ple.358.2022.11.18.01.42.18; Fri, 18 Nov 2022 01:42:51 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=CNjYfCGv; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241494AbiKRIfU (ORCPT + 90 others); Fri, 18 Nov 2022 03:35:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230042AbiKRIey (ORCPT ); Fri, 18 Nov 2022 03:34:54 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56BCD8EB6A; Fri, 18 Nov 2022 00:34:14 -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 ams.source.kernel.org (Postfix) with ESMTPS id 0B551B822A9; Fri, 18 Nov 2022 08:34:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65A8EC433C1; Fri, 18 Nov 2022 08:34:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668760451; bh=IOj/GiYagUGnVOGJEzutZQawFTK6GTzvsmI3Kj7AE8w=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=CNjYfCGvsCrglg+uj3KUjbD+rJc+xgvTsqflC7I+JVnSj1YTrgUPcfPC/oIhiEvTR NnnRhMWJ7HeaFobc8Os3uran+o21ZcPtXUeYg0AMh8ua2RfVrAXC6XojC2eWCQyX/j dBm980XQ6iMQi+pG5P11vovELHlY22lxWEVfL+o8vcubrdy79l3rSZmDp+YkfSOSFv yA9Ne5bCV6GFFnIh8Rk2ca75nY0ZIHogPuNlzkIZvFqygyM5u9WLeaiJZfOUpJLjtn 09WVDbdG7cgm1dKZlc3LK27lzDDa7gvwODfDvnC0+N11gVQbUxdoUINg/Ta2AqP8ev mxAexT0ZAxpZw== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20221118011249.48112-1-yuehaibing@huawei.com> References: <20221118011249.48112-1-yuehaibing@huawei.com> Subject: Re: [PATCH] macsec: Fix invalid error code set From: Antoine Tenart Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, YueHaibing To: YueHaibing , davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Date: Fri, 18 Nov 2022 09:34:02 +0100 Message-ID: <166876044229.7589.614742433983865@kwain.local> 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 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 Quoting YueHaibing (2022-11-18 02:12:49) > 'ret' is defined twice in macsec_changelink(), when it is set in macsec_i= s_offloaded > case, it will be invalid before return. >=20 > Fixes: 3cf3227a21d1 ("net: macsec: hardware offloading infrastructure") > Signed-off-by: YueHaibing Reviewed-by: Antoine Tenart Thanks! > --- > drivers/net/macsec.c | 1 - > 1 file changed, 1 deletion(-) >=20 > diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c > index a7b46219bab7..d73b9d535b7a 100644 > --- a/drivers/net/macsec.c > +++ b/drivers/net/macsec.c > @@ -3835,7 +3835,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; > =20 > ops =3D macsec_get_ops(netdev_priv(dev), &ctx); > if (!ops) { > --=20 > 2.20.1 >