staging: rtl8723bs: hal: Remove comparison to NULL in hal_com_phycfg.c
Remove comparison to NULL in file hal_com_phycfg.c. Suggested by Coccinelle. Signed-off-by: Himadri Pandya <himadri18.07@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7cd6f4b0f5
commit
8f884e76ca
@ -2236,7 +2236,7 @@ int phy_ConfigMACWithParaFile(struct adapter *Adapter, char *pFileName)
|
||||
|
||||
memset(pHalData->para_file_buf, 0, MAX_PARA_FILE_BUF_LEN);
|
||||
|
||||
if ((pHalData->mac_reg_len == 0) && (pHalData->mac_reg == NULL)) {
|
||||
if ((pHalData->mac_reg_len == 0) && !pHalData->mac_reg) {
|
||||
rtw_merge_string(file_path_bs, PATH_MAX, rtw_phy_file_path, pFileName);
|
||||
|
||||
if (rtw_is_file_readable(file_path_bs) == true) {
|
||||
@ -2311,7 +2311,7 @@ int phy_ConfigBBWithParaFile(
|
||||
|
||||
memset(pHalData->para_file_buf, 0, MAX_PARA_FILE_BUF_LEN);
|
||||
|
||||
if ((pBufLen != NULL) && (*pBufLen == 0) && (pBuf == NULL)) {
|
||||
if (pBufLen && (*pBufLen == 0) && !pBuf) {
|
||||
rtw_merge_string(file_path_bs, PATH_MAX, rtw_phy_file_path, pFileName);
|
||||
|
||||
if (rtw_is_file_readable(file_path_bs) == true) {
|
||||
@ -2336,7 +2336,7 @@ int phy_ConfigBBWithParaFile(
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((pBufLen != NULL) && (*pBufLen == 0) && (pBuf == NULL)) {
|
||||
if (pBufLen && (*pBufLen == 0) && !pBuf) {
|
||||
memcpy(pHalData->para_file_buf, pBuf, *pBufLen);
|
||||
rtStatus = _SUCCESS;
|
||||
} else
|
||||
@ -2680,7 +2680,7 @@ int phy_ConfigBBWithPgParaFile(struct adapter *Adapter, char *pFileName)
|
||||
|
||||
memset(pHalData->para_file_buf, 0, MAX_PARA_FILE_BUF_LEN);
|
||||
|
||||
if ((pHalData->bb_phy_reg_pg_len == 0) && (pHalData->bb_phy_reg_pg == NULL)) {
|
||||
if ((pHalData->bb_phy_reg_pg_len == 0) && !pHalData->bb_phy_reg_pg) {
|
||||
rtw_merge_string(file_path_bs, PATH_MAX, rtw_phy_file_path, pFileName);
|
||||
|
||||
if (rtw_is_file_readable(file_path_bs) == true) {
|
||||
@ -2743,7 +2743,7 @@ int PHY_ConfigRFWithParaFile(
|
||||
|
||||
memset(pHalData->para_file_buf, 0, MAX_PARA_FILE_BUF_LEN);
|
||||
|
||||
if ((pBufLen != NULL) && (*pBufLen == 0) && (pBuf == NULL)) {
|
||||
if (pBufLen && (*pBufLen == 0) && !pBuf) {
|
||||
rtw_merge_string(file_path_bs, PATH_MAX, rtw_phy_file_path, pFileName);
|
||||
|
||||
if (rtw_is_file_readable(file_path_bs) == true) {
|
||||
@ -2768,7 +2768,7 @@ int PHY_ConfigRFWithParaFile(
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((pBufLen != NULL) && (*pBufLen == 0) && (pBuf == NULL)) {
|
||||
if (pBufLen && (*pBufLen == 0) && !pBuf) {
|
||||
memcpy(pHalData->para_file_buf, pBuf, *pBufLen);
|
||||
rtStatus = _SUCCESS;
|
||||
} else
|
||||
@ -2925,7 +2925,7 @@ int PHY_ConfigRFWithTxPwrTrackParaFile(struct adapter *Adapter, char *pFileName)
|
||||
|
||||
memset(pHalData->para_file_buf, 0, MAX_PARA_FILE_BUF_LEN);
|
||||
|
||||
if ((pHalData->rf_tx_pwr_track_len == 0) && (pHalData->rf_tx_pwr_track == NULL)) {
|
||||
if ((pHalData->rf_tx_pwr_track_len == 0) && !pHalData->rf_tx_pwr_track) {
|
||||
rtw_merge_string(file_path_bs, PATH_MAX, rtw_phy_file_path, pFileName);
|
||||
|
||||
if (rtw_is_file_readable(file_path_bs) == true) {
|
||||
@ -3238,7 +3238,7 @@ int PHY_ConfigRFWithPowerLimitTableParaFile(
|
||||
|
||||
memset(pHalData->para_file_buf, 0, MAX_PARA_FILE_BUF_LEN);
|
||||
|
||||
if ((pHalData->rf_tx_pwr_lmt_len == 0) && (pHalData->rf_tx_pwr_lmt == NULL)) {
|
||||
if ((pHalData->rf_tx_pwr_lmt_len == 0) && !pHalData->rf_tx_pwr_lmt) {
|
||||
rtw_merge_string(file_path_bs, PATH_MAX, rtw_phy_file_path, pFileName);
|
||||
|
||||
if (rtw_is_file_readable(file_path_bs) == true) {
|
||||
|
Loading…
Reference in New Issue
Block a user