Skip to contentSkip to conversation

staging:rtl8188eu Fix comparison to NULL

PATCH New Janani Sankara Babu 1 participant 1 message Aug 31, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging:rtl8188eu Fix comparison to NULL

This patch replaces the comparison of variable say x to NULL with '!x'

---
 drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8188eu/core/rtw_mlme.c +1 -1
index 8480d30..ce179c6 100644
@@ -1502,7 +1502,7 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
 	pmlmepriv->pscanned = phead->next;
 	while (phead != pmlmepriv->pscanned) {
 		pnetwork = container_of(pmlmepriv->pscanned, struct wlan_network, list);
-		if (pnetwork == NULL) {
+		if (!pnetwork) {
 			RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("%s return _FAIL:(pnetwork==NULL)\n", __func__));
 			ret = _FAIL;
 			goto exit;
Signature · 1 line
1.9.1