Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp428335rdb; Tue, 15 Aug 2023 00:21:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFi0Br8KaJWYOwIGYB4zxiEGtbQimmouk9l6p+AIVH8fjek/RdeXZLaYe/4WZ22E4pPmuif X-Received: by 2002:a17:902:c404:b0:1bd:cde4:8b3a with SMTP id k4-20020a170902c40400b001bdcde48b3amr11320746plk.23.1692084081945; Tue, 15 Aug 2023 00:21:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692084081; cv=none; d=google.com; s=arc-20160816; b=isGiHPPCbEtH0DcU3Bi7j8FE4LgisNcAl6Azz77BnccxiD1Ln0dutt5+OAS9+UdJ/Y 8AE+8r7mPcvzTeW4GaAjZ5cPz6PMxMV/3/yo+Run+h+a1w0gjnXOsvC/mpinI4gCbOEB 2Dfffuv0H/5YwhxUNNSeAiuIHYaOclRVvKXdsDG/m0pm7Yd563mVPa2bun3CeCI8ATXz naYvarQom8lEsrrBLDlKd+3PyjMIPvv6spl7Ez2Wj8HbdcIMWqacRgxWtJtXT72CAtdw y6GB0x4OpJPeqWqj18ZvzzmRl7cvyx87OtvCbu7V0i0wTj07jIytqqJin6gTdVpILbvP AtGA== 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 :message-id:date:subject:cc:to:from; bh=oslenWDvJbn4CKwDTkXD2H2SBvMEdFzaLM2lzHnbYCI=; fh=VSEcSYnTXL4MmqdoSWAq9CGg5O2HS6XFHsPGxzuh8x8=; b=rACPqIV/LaoUM3N5vwEIomWCL7IkHB+MUswQ+H1qa0dym2LGzXY6uulYqyKB3tuBi5 PpPVBG3sTRm0UCM3DPgD8s1zGETBsIdVtZ6oJ2E4HmRY1S/NnOWBPoi/78X/DY0hVIo5 fkqiohxUIDdRoIa2hRDlX3lazqw7eBVAnzvACWNEPFYpuLYw0G8IOKKeIcpwZZ6ZFLZr YgWGQxdflslwhnOD7ov/97R0TB8tSl9o6P4vtjhV+3fzGeaoOHqoOtBl9niAyl6nKNuX cxUWuP2gSW0qj3idftthx3vHMjTeolNic/YjRluOWj98wQvdrIury7OSK6c5e8waauF9 FOTQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=red-soft.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s8-20020a170903320800b001bbc138af14si8978744plh.160.2023.08.15.00.21.05; Tue, 15 Aug 2023 00:21:21 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=red-soft.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232747AbjHNVKT (ORCPT + 99 others); Mon, 14 Aug 2023 17:10:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232781AbjHNVKH (ORCPT ); Mon, 14 Aug 2023 17:10:07 -0400 X-Greylist: delayed 525 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 14 Aug 2023 14:10:05 PDT Received: from gw.red-soft.ru (red-soft.ru [188.246.186.2]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 958DCE65; Mon, 14 Aug 2023 14:10:05 -0700 (PDT) Received: from localhost.biz (unknown [10.81.81.211]) by gw.red-soft.ru (Postfix) with ESMTPA id C934A3E1A99; Tue, 15 Aug 2023 00:00:35 +0300 (MSK) From: Artem Chernyshev To: Michael Chan Cc: Artem Chernyshev , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: [PATCH] broadcom: b44: Use b44_writephy() return value Date: Tue, 15 Aug 2023 00:00:30 +0300 Message-Id: <20230814210030.332859-1-artem.chernyshev@red-soft.ru> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Lua-Profiles: 179236 [Aug 14 2023] X-KLMS-AntiSpam-Version: 5.9.59.0 X-KLMS-AntiSpam-Envelope-From: artem.chernyshev@red-soft.ru X-KLMS-AntiSpam-Rate: 0 X-KLMS-AntiSpam-Status: not_detected X-KLMS-AntiSpam-Method: none X-KLMS-AntiSpam-Auth: dkim=none X-KLMS-AntiSpam-Info: LuaCore: 526 526 7a6a9b19f6b9b3921b5701490f189af0e0cd5310, {Tracking_from_domain_doesnt_match_to}, d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;localhost.biz:7.1.1;red-soft.ru:7.1.1;127.0.0.199:7.1.2, FromAlignment: s X-MS-Exchange-Organization-SCL: -1 X-KLMS-AntiSpam-Interceptor-Info: scan successful X-KLMS-AntiPhishing: Clean, bases: 2023/08/14 18:25:00 X-KLMS-AntiVirus: Kaspersky Security for Linux Mail Server, version 8.0.3.30, bases: 2023/08/14 16:28:00 #21610558 X-KLMS-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,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 Return result of b44_writephy() instead of zero to deal with possible error. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Artem Chernyshev --- drivers/net/ethernet/broadcom/b44.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c index 392ec09a1d8a..7f94e42ae277 100644 --- a/drivers/net/ethernet/broadcom/b44.c +++ b/drivers/net/ethernet/broadcom/b44.c @@ -1793,11 +1793,9 @@ static int b44_nway_reset(struct net_device *dev) b44_readphy(bp, MII_BMCR, &bmcr); b44_readphy(bp, MII_BMCR, &bmcr); r = -EINVAL; - if (bmcr & BMCR_ANENABLE) { - b44_writephy(bp, MII_BMCR, - bmcr | BMCR_ANRESTART); - r = 0; - } + if (bmcr & BMCR_ANENABLE) + r = b44_writephy(bp, MII_BMCR, + bmcr | BMCR_ANRESTART); spin_unlock_irq(&bp->lock); return r; -- 2.37.3