Commit 8ece288b authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman

staging: r8188eu: convert phy_RF6052_Config_ParaFile() to common error logic

Convert the function phy_RF6052_Config_ParaFile() away from returning
_FAIL or _SUCCESS which uses inverted error logic. Use the common error
logic instead. Return 0 for success and negative values for failure.
Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230115210734.18610-3-straube.linux@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6eacd242
...@@ -371,7 +371,7 @@ int phy_RF6052_Config_ParaFile(struct adapter *Adapter) ...@@ -371,7 +371,7 @@ int phy_RF6052_Config_ParaFile(struct adapter *Adapter)
struct bb_reg_def *pPhyReg; struct bb_reg_def *pPhyReg;
struct hal_data_8188e *pHalData = &Adapter->haldata; struct hal_data_8188e *pHalData = &Adapter->haldata;
u32 u4RegValue = 0; u32 u4RegValue = 0;
int rtStatus = _SUCCESS; int err;
/* Initialize RF */ /* Initialize RF */
...@@ -396,11 +396,10 @@ int phy_RF6052_Config_ParaFile(struct adapter *Adapter) ...@@ -396,11 +396,10 @@ int phy_RF6052_Config_ParaFile(struct adapter *Adapter)
udelay(1);/* PlatformStallExecution(1); */ udelay(1);/* PlatformStallExecution(1); */
/*----Initialize RF fom connfiguration file----*/ /*----Initialize RF fom connfiguration file----*/
if (ODM_ReadAndConfig_RadioA_1T_8188E(&pHalData->odmpriv)) err = ODM_ReadAndConfig_RadioA_1T_8188E(&pHalData->odmpriv);
rtStatus = _FAIL;
/*----Restore RFENV control type----*/; /*----Restore RFENV control type----*/;
rtl8188e_PHY_SetBBReg(Adapter, pPhyReg->rfintfs, bRFSI_RFENV, u4RegValue); rtl8188e_PHY_SetBBReg(Adapter, pPhyReg->rfintfs, bRFSI_RFENV, u4RegValue);
return rtStatus; return err;
} }
...@@ -610,9 +610,8 @@ u32 rtl8188eu_hal_init(struct adapter *Adapter) ...@@ -610,9 +610,8 @@ u32 rtl8188eu_hal_init(struct adapter *Adapter)
if (status == _FAIL) if (status == _FAIL)
goto exit; goto exit;
status = phy_RF6052_Config_ParaFile(Adapter); if (phy_RF6052_Config_ParaFile(Adapter))
if (status == _FAIL) return _FAIL;
goto exit;
status = rtl8188e_iol_efuse_patch(Adapter); status = rtl8188e_iol_efuse_patch(Adapter);
if (status == _FAIL) if (status == _FAIL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment