Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp918182rwb; Fri, 13 Jan 2023 05:55:51 -0800 (PST) X-Google-Smtp-Source: AMrXdXu1bC+zwKGiHQrueWypkbH1lS9b43Zz9Z7QZ5krqwicDUcKKaq4scXIqjn6JSG4BFHiheDm X-Received: by 2002:aa7:cd49:0:b0:497:d8ea:d79c with SMTP id v9-20020aa7cd49000000b00497d8ead79cmr22503012edw.27.1673618150923; Fri, 13 Jan 2023 05:55:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673618150; cv=none; d=google.com; s=arc-20160816; b=K/Dsne125rxfk85/pn31pQBniycIKkyelNqyvD8MIKHmQz8hEirHPfDn5IXDK2ULQ/ TaL/Ge08u0YVdrSZjPtutdlgwNtgVYO4Scbdq35w826s+9HzOSxbGd+0HmK+n6bTN28H b2WiyVZBmdG4cm3itSw7pBeoWZYX1lwZlMcSoDqSZfWeYCiazg0N2HIrFTKJBXJlu3nE 7llx/B+OczF0CiOHI73oJ7YSpSCiYUZkqgPTF/Sr48gOXvF6FuHhUJ7a7kHoBNva7pmO Tnzmfwnu67ZriKvCQ9+tbS8SbYBHTqFbyz6ZgPHsc5eFdjqMq2K3XaIAOoeXsVG+SkUF ZpkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=yp6uv5Fh7h8BQa8qt2GS5w6smCQU5e2VSr/x8Q9YfvE=; b=pXX7wOVPSHUfnEjNUX9uMqV9GYRgLfRbg0S3rJaGl9Slf7yP5T4fVQxMLFljOtoCBm i1suIORsOF5Fe6Iltb+2YifvkftfSxbunb5kcKtqULLaIEYNQDjro1doRwYmS4ohF/YM eq58pN9iJaHQsHqS2C31eQ9gxz3AC+wXsf4yDBEjcJNdHkDI6/5BRBjVGn+i/OPdKOjU GTApV6moaP1VmkVKQWzEGYceysKIT8EPbmg1KKtVolns2sSD/Xw/8G4j50CcPzCn2FqS yDUWmXUPAi6HxIMdcU3yLL0o7cXZaEmo81SZ8gDnQXJPXGdLwRpDrsyRuVHQHhMCFxo2 4MDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ii596FfO; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h19-20020a05640250d300b0048b0ae570d8si25577956edb.508.2023.01.13.05.55.38; Fri, 13 Jan 2023 05:55:50 -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=@gmail.com header.s=20210112 header.b=ii596FfO; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241696AbjAMNe3 (ORCPT + 51 others); Fri, 13 Jan 2023 08:34:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241855AbjAMNdf (ORCPT ); Fri, 13 Jan 2023 08:33:35 -0500 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFE585D6B9; Fri, 13 Jan 2023 05:26:40 -0800 (PST) Received: by mail-ej1-x630.google.com with SMTP id ss4so45052440ejb.11; Fri, 13 Jan 2023 05:26:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=yp6uv5Fh7h8BQa8qt2GS5w6smCQU5e2VSr/x8Q9YfvE=; b=ii596FfO+j0K+Dy6HVm/KD7JigQ7QzO5khKfNwp8UydDZX5et7C5USxvSlSbBde6Sv WzZUqGFE2ZbPVLRVDYBBxAzv8948v2v6/84yIdvVXPR77QlXUR0zZV7w2dDXA2IaczSe fYbauv9aJJjrjWuR5fgW15eXdam/U0z1oAP8fwuU08+dm73f7NoeuByn8X4HRqac4L08 wNWlloInPUnWnpdtBgEsJEM6ACKwC82oTs6z9bOOrTTWT6MS444YgOFJ+4wNXoDOxHj/ QyvYA1UIYEUGyIuY89mP61ieyMHjs9VVqSoeByaUWMRC+9K7+iLcgtdkAKSdmG5AoIAj uQ5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yp6uv5Fh7h8BQa8qt2GS5w6smCQU5e2VSr/x8Q9YfvE=; b=ZMk6wgEF1qEpZCHtb72Vh/JMvXSjlGo5DNCxqppQ76hnkNTpWx7URgATN/702bjLVM vIueUJnrF9joy25OmBshZ/0eiqkIgAta0strAz6+es4M/PvWHsYds+2BGJdUENbr0xg5 nUBtyH4OYdfSsq7dzU43h11AoRWXDCgwXgLJAD0jC+RxuKURhPSxRMmMdOJ23aBGb5J/ jxoIXFbbj7p2q5jwWqB5Kv7gX1NBobooKKTH3Gw00eYZG3KezyMJ0yUqDfnry/hnLQe2 IUgVAqxywKqAyLBa4PJFzpxKBesbFzcWZqdaEXYP+M0zW6G9M1/A+1AR8X/9tHOAP3s8 gSCA== X-Gm-Message-State: AFqh2krkvAqzOPe7e6bHSQNDo9yJyS4tpP/T2f6wWVhmH05Xy3j8t/08 rsHkW08mTP1AuT9g9ay4mJk= X-Received: by 2002:a17:907:cbc8:b0:84d:428f:be90 with SMTP id vk8-20020a170907cbc800b0084d428fbe90mr3487954ejc.42.1673616399398; Fri, 13 Jan 2023 05:26:39 -0800 (PST) Received: from gvm01 (net-5-89-66-224.cust.vodafonedsl.it. [5.89.66.224]) by smtp.gmail.com with ESMTPSA id c23-20020a170906155700b007a9c3831409sm8510938ejd.137.2023.01.13.05.26.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 05:26:38 -0800 (PST) Date: Fri, 13 Jan 2023 14:26:35 +0100 From: Piergiorgio Beruto To: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Oleksij Rempel , mailhol.vincent@wanadoo.fr, sudheer.mogilappagari@intel.com, sbhatta@marvell.com, linux-doc@vger.kernel.org, wangjie125@huawei.com, corbet@lwn.net, lkp@intel.com, gal@nvidia.com, gustavoars@kernel.org, bagasdotme@gmail.com Subject: [PATCH v3 net-next 1/1] plca.c: fix obvious mistake in checking retval Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Revert a wrong fix that was done during the review process. The intention was to substitute "if(ret < 0)" with "if(ret)". Unfortunately, the intended fix did not meet the code. Besides, after additional review, it was decided that "if(ret < 0)" was actually the right thing to do. Fixes: 8580e16c28f3 ("net/ethtool: add netlink interface for the PLCA RS") Signed-off-by: Piergiorgio Beruto Reviewed-by: Andrew Lunn --- net/ethtool/plca.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/ethtool/plca.c b/net/ethtool/plca.c index d9bb13ffc654..be7404dc9ef2 100644 --- a/net/ethtool/plca.c +++ b/net/ethtool/plca.c @@ -61,7 +61,7 @@ static int plca_get_cfg_prepare_data(const struct ethnl_req_info *req_base, } ret = ethnl_ops_begin(dev); - if (!ret) + if (ret < 0) goto out; memset(&data->plca_cfg, 0xff, @@ -151,7 +151,7 @@ int ethnl_set_plca_cfg(struct sk_buff *skb, struct genl_info *info) tb[ETHTOOL_A_PLCA_HEADER], genl_info_net(info), info->extack, true); - if (!ret) + if (ret < 0) return ret; dev = req_info.dev; @@ -171,7 +171,7 @@ int ethnl_set_plca_cfg(struct sk_buff *skb, struct genl_info *info) } ret = ethnl_ops_begin(dev); - if (!ret) + if (ret < 0) goto out_rtnl; memset(&plca_cfg, 0xff, sizeof(plca_cfg)); @@ -189,7 +189,7 @@ int ethnl_set_plca_cfg(struct sk_buff *skb, struct genl_info *info) goto out_ops; ret = ops->set_plca_cfg(dev->phydev, &plca_cfg, info->extack); - if (!ret) + if (ret < 0) goto out_ops; ethtool_notify(dev, ETHTOOL_MSG_PLCA_NTF, NULL); @@ -233,7 +233,7 @@ static int plca_get_status_prepare_data(const struct ethnl_req_info *req_base, } ret = ethnl_ops_begin(dev); - if (!ret) + if (ret < 0) goto out; memset(&data->plca_st, 0xff, -- 2.37.4