Commit 0a6f6e93 authored by Himadri Pandya's avatar Himadri Pandya Committed by Greg Kroah-Hartman

staging: rtl8723bs: hal: Remove comparison to NULL in hal_com.c

Remove comparison to NULL in file hal_com.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 8f884e76
...@@ -18,7 +18,7 @@ u8 rtw_hal_data_init(struct adapter *padapter) ...@@ -18,7 +18,7 @@ u8 rtw_hal_data_init(struct adapter *padapter)
if (is_primary_adapter(padapter)) { /* if (padapter->isprimary) */ if (is_primary_adapter(padapter)) { /* if (padapter->isprimary) */
padapter->hal_data_sz = sizeof(struct hal_com_data); padapter->hal_data_sz = sizeof(struct hal_com_data);
padapter->HalData = vzalloc(padapter->hal_data_sz); padapter->HalData = vzalloc(padapter->hal_data_sz);
if (padapter->HalData == NULL) { if (!padapter->HalData) {
DBG_8192C("cannot alloc memory for HAL DATA\n"); DBG_8192C("cannot alloc memory for HAL DATA\n");
return _FAIL; return _FAIL;
} }
...@@ -909,7 +909,7 @@ s32 c2h_evt_read_88xx(struct adapter *adapter, u8 *buf) ...@@ -909,7 +909,7 @@ s32 c2h_evt_read_88xx(struct adapter *adapter, u8 *buf)
int i; int i;
u8 trigger; u8 trigger;
if (buf == NULL) if (!buf)
goto exit; goto exit;
trigger = rtw_read8(adapter, REG_C2HEVT_CLEAR); trigger = rtw_read8(adapter, REG_C2HEVT_CLEAR);
...@@ -982,7 +982,7 @@ void rtw_hal_update_sta_rate_mask(struct adapter *padapter, struct sta_info *pst ...@@ -982,7 +982,7 @@ void rtw_hal_update_sta_rate_mask(struct adapter *padapter, struct sta_info *pst
u8 i, rf_type, limit; u8 i, rf_type, limit;
u32 tx_ra_bitmap; u32 tx_ra_bitmap;
if (psta == NULL) if (!psta)
return; return;
tx_ra_bitmap = 0; tx_ra_bitmap = 0;
...@@ -1407,7 +1407,7 @@ bool GetHexValueFromString(char *szStr, u32 *pu4bVal, u32 *pu4bMove) ...@@ -1407,7 +1407,7 @@ bool GetHexValueFromString(char *szStr, u32 *pu4bVal, u32 *pu4bMove)
char *szScan = szStr; char *szScan = szStr;
/* Check input parameter. */ /* Check input parameter. */
if (szStr == NULL || pu4bVal == NULL || pu4bMove == NULL) { if (!szStr || !pu4bVal || !pu4bMove) {
DBG_871X("GetHexValueFromString(): Invalid input arguments! szStr: %p, pu4bVal: %p, pu4bMove: %p\n", DBG_871X("GetHexValueFromString(): Invalid input arguments! szStr: %p, pu4bVal: %p, pu4bMove: %p\n",
szStr, pu4bVal, pu4bMove); szStr, pu4bVal, pu4bMove);
return false; return false;
......
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