Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2208685rdg; Sun, 13 Aug 2023 14:30:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGgBUFdK0a8NwbOq9Xh35Tyg01MjNOOE3ZUSQwHDoG2LEkOWu2c3aZbFXncI5Txh6pOpWf3 X-Received: by 2002:aa7:c1d2:0:b0:522:3ea4:81a9 with SMTP id d18-20020aa7c1d2000000b005223ea481a9mr5844009edp.34.1691962232556; Sun, 13 Aug 2023 14:30:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691962232; cv=none; d=google.com; s=arc-20160816; b=TxiBSBQVSE5zSIIEkeqdp9NgT9OOjwKfEC/ExREEIcT6baOF3tvC0bEw0OBKSQQiU4 r2WWZFISrqaEcSHaZdRnUpGYnPsfsaJBsXl9TvPW3yVzEUiSkeLA1ea8idFaoWXobSMd iVgviUCGtnH9SkhzDIHJ/qzKAASM6+mCRojYe+UwvA3o8GF10auYwoSwcvvM67EhPnEf A6hSJCXYlEVCXTywDRcsGRagAlTAfzD+zIUI3sOseYp/rUDWJsC9VrXCZEABP16UJP6V 8mgtLNq1wgH68z9AILLO9HLfzmBQ/NVxq0FHPOLQZX4egVSiOCaoPlFU4+TgMzhiatTT HcwA== 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=s+q3W6d/jMd3r06BWFAb+qRW8z0+lUbAOiiAADuW6sQ=; fh=9z2Rp4C6/yPyHukW4bAfGP5iEwK443zSdgxLGEOfSPA=; b=QLov3/yEeSzGEmb2U6l/SRTTjdGDiRmRPDfPsdLOvzTeBCryxtulPsNRqubGCD3xwg s9nEtRnNCeobIl6njJJdteAM3HHhGNQl555JeNDw1g2iddZlDdF0lmyTkeluN+gFbvY2 wz3XAG/T/cxnt0dr1z6bdMgO7OXdhC8f+w1n1xH8QRO7DODINZSMGo3YvlVLHwtwt1iG 2TaINXXSePNS0Pz8EwFb5z0lYWPiB6QOV7ASNwj/fiu4XlByhM2BDCJDNons1CUEYMkK udSPGPkTeNGAKwryb6pZMVFSazHXswa8pnxjB7rVHa+D2h8bxji6LSMtZECepA7deDj5 AnfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-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 d17-20020aa7d691000000b0052337f4212bsi6940698edr.108.2023.08.13.14.30.14; Sun, 13 Aug 2023 14:30:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-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 S231855AbjHMVaA (ORCPT + 54 others); Sun, 13 Aug 2023 17:30:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231836AbjHMVaA (ORCPT ); Sun, 13 Aug 2023 17:30:00 -0400 X-Greylist: delayed 371 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sun, 13 Aug 2023 14:30:01 PDT Received: from gw.red-soft.ru (red-soft.ru [188.246.186.2]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E11BD10D7 for ; Sun, 13 Aug 2023 14:30:01 -0700 (PDT) Received: from localhost.biz (unknown [10.81.81.211]) by gw.red-soft.ru (Postfix) with ESMTPA id 0DD823E1A87; Mon, 14 Aug 2023 00:23:48 +0300 (MSK) From: Artem Chernyshev To: Franky Lin Cc: Artem Chernyshev , Hante Meuleman , Arend van Spriel , Kalle Valo , linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, SHA-cyfmac-dev-list@infineon.com, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: [PATCH] brcm80211: brcmsmac: phy_cmn: Remove unreachable code Date: Mon, 14 Aug 2023 00:23:43 +0300 Message-Id: <20230813212343.245521-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: 179213 [Aug 12 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}, red-soft.ru:7.1.1;localhost.biz:7.1.1;d41d8cd98f00b204e9800998ecf8427e.com: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/13 18:44:00 X-KLMS-AntiVirus: Kaspersky Security for Linux Mail Server, version 8.0.3.30, bases: 2023/08/13 17:49:00 #21598114 X-KLMS-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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-wireless@vger.kernel.org Since wlc_phy_txpwr_srom_read_nphy() in wlc_phy_attach_nphy() can not return false it's impossible to get true value in this if statement Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Artem Chernyshev --- drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c index ccc621b8ed9f..07f83ff5a54a 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c @@ -551,8 +551,7 @@ wlc_phy_attach(struct shared_phy *sh, struct bcma_device *d11core, if (!pi->phycal_timer) goto err; - if (!wlc_phy_attach_nphy(pi)) - goto err; + wlc_phy_attach_nphy(pi); } else if (ISLCNPHY(pi)) { if (!wlc_phy_attach_lcnphy(pi)) -- 2.37.3