From nobody Mon Jun 29 18:39:49 2026 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 018C9C433FE for ; Thu, 3 Feb 2022 20:18:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242368AbiBCUSE (ORCPT ); Thu, 3 Feb 2022 15:18:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343643AbiBCUSB (ORCPT ); Thu, 3 Feb 2022 15:18:01 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CD11C06173B for ; Thu, 3 Feb 2022 12:18:00 -0800 (PST) Received: from dslb-188-096-149-005.188.096.pools.vodafone-ip.de ([188.96.149.5] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1nFiYH-0004N1-08; Thu, 03 Feb 2022 21:17:57 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 1/2] staging: r8188eu: remove unnecessary error check Date: Thu, 3 Feb 2022 21:17:44 +0100 Message-Id: <20220203201745.251826-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220203201745.251826-1-martin@kaiser.cx> References: <20220203201745.251826-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove an unnecessary error check in phy_BB8188E_Config_ParaFile. There's no need to goto phy_BB8190_Config_ParaFile_Fail, this label is in the following line. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c b/drivers/stagin= g/r8188eu/hal/rtl8188e_phycfg.c index 41a0d7f0d29f..accbd08d4fd1 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c @@ -508,9 +508,6 @@ static int phy_BB8188E_Config_ParaFile(struct adapter *= Adapter) if (HAL_STATUS_FAILURE =3D=3D ODM_ReadAndConfig_AGC_TAB_1T_8188E(&pHalDat= a->odmpriv)) rtStatus =3D _FAIL; =20 - if (rtStatus !=3D _SUCCESS) - goto phy_BB8190_Config_ParaFile_Fail; - phy_BB8190_Config_ParaFile_Fail: =20 return rtStatus; --=20 2.30.2 From nobody Mon Jun 29 18:39:49 2026 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 7346AC433F5 for ; Thu, 3 Feb 2022 20:18:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353997AbiBCUSM (ORCPT ); Thu, 3 Feb 2022 15:18:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354005AbiBCUSJ (ORCPT ); Thu, 3 Feb 2022 15:18:09 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA17DC061741 for ; Thu, 3 Feb 2022 12:18:09 -0800 (PST) Received: from dslb-188-096-149-005.188.096.pools.vodafone-ip.de ([188.96.149.5] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1nFiYK-0004N1-Vn; Thu, 03 Feb 2022 21:18:01 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 2/2] staging: r8188eu: simplify error handling in phy_BB8188E_Config_ParaFile Date: Thu, 3 Feb 2022 21:17:45 +0100 Message-Id: <20220203201745.251826-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220203201745.251826-1-martin@kaiser.cx> References: <20220203201745.251826-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Simplify error handling in phy_BB8188E_Config_ParaFile. Exit immediately when there's an error, do not jump to the end of the function. We do not have anything to clean up before we return. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c b/drivers/stagin= g/r8188eu/hal/rtl8188e_phycfg.c index accbd08d4fd1..8279768201b7 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c @@ -487,16 +487,13 @@ static int phy_BB8188E_Config_ParaFile(struct adapter= *Adapter) { struct eeprom_priv *pEEPROM =3D &Adapter->eeprompriv; struct hal_data_8188e *pHalData =3D &Adapter->haldata; - int rtStatus =3D _SUCCESS; =20 /* */ /* 1. Read PHY_REG.TXT BB INIT!! */ /* We will separate as 88C / 92C according to chip version */ /* */ if (HAL_STATUS_FAILURE =3D=3D ODM_ReadAndConfig_PHY_REG_1T_8188E(&pHalDat= a->odmpriv)) - rtStatus =3D _FAIL; - if (rtStatus !=3D _SUCCESS) - goto phy_BB8190_Config_ParaFile_Fail; + return _FAIL; =20 /* 2. If EEPROM or EFUSE autoload OK, We must config by PHY_REG_PG.txt */ if (!pEEPROM->bautoload_fail_flag) { @@ -506,11 +503,9 @@ static int phy_BB8188E_Config_ParaFile(struct adapter = *Adapter) =20 /* 3. BB AGC table Initialization */ if (HAL_STATUS_FAILURE =3D=3D ODM_ReadAndConfig_AGC_TAB_1T_8188E(&pHalDat= a->odmpriv)) - rtStatus =3D _FAIL; + return _FAIL; =20 -phy_BB8190_Config_ParaFile_Fail: - - return rtStatus; + return _SUCCESS; } =20 int --=20 2.30.2