Commit 8f884e76 authored by Himadri Pandya's avatar Himadri Pandya Committed by Greg Kroah-Hartman

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: default avatarHimadri Pandya <himadri18.07@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7cd6f4b0
......@@ -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) {
......
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