From 0a6f6e9351dbf44a217a8b21800808779e87b469 Mon Sep 17 00:00:00 2001 From: Himadri Pandya Date: Sun, 17 Mar 2019 11:44:58 +0530 Subject: [PATCH] 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: Himadri Pandya Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723bs/hal/hal_com.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c index 7f8ec55b08f1..b97b53c34449 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com.c +++ b/drivers/staging/rtl8723bs/hal/hal_com.c @@ -18,7 +18,7 @@ u8 rtw_hal_data_init(struct adapter *padapter) if (is_primary_adapter(padapter)) { /* if (padapter->isprimary) */ padapter->hal_data_sz = sizeof(struct hal_com_data); padapter->HalData = vzalloc(padapter->hal_data_sz); - if (padapter->HalData == NULL) { + if (!padapter->HalData) { DBG_8192C("cannot alloc memory for HAL DATA\n"); return _FAIL; } @@ -909,7 +909,7 @@ s32 c2h_evt_read_88xx(struct adapter *adapter, u8 *buf) int i; u8 trigger; - if (buf == NULL) + if (!buf) goto exit; 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 u8 i, rf_type, limit; u32 tx_ra_bitmap; - if (psta == NULL) + if (!psta) return; tx_ra_bitmap = 0; @@ -1407,7 +1407,7 @@ bool GetHexValueFromString(char *szStr, u32 *pu4bVal, u32 *pu4bMove) char *szScan = szStr; /* 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", szStr, pu4bVal, pu4bMove); return false;