From: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
Date: Mon, 18 Mar 2019 14:29:44 +0000 (+0530)
Subject: Staging: rtl8188eu: core: rtw_mlme.c: Replace NULL comparision.
X-Git-Tag: v5.4-rc1~1076^2~367
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d85be9b1f0ad41572852d5c0a362ebbedc5328ca;p=platform%2Fkernel%2Flinux-rpi.git

Staging: rtl8188eu: core: rtw_mlme.c: Replace NULL comparision.

Replace NULL comparison with '!' in the file rtw_mlme.c
Issue found by checkpatch.pl semantic patch results for rtw_mlme.c

CHECK:Comparision to NULL could be written "!candidate"

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index ca0cf8a86671..2b5aaa940957 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -1438,7 +1438,7 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
 			goto exit;
 	}
 
-	if (*candidate == NULL || (*candidate)->network.Rssi < competitor->network.Rssi) {
+	if (!*candidate || (*candidate)->network.Rssi < competitor->network.Rssi) {
 		*candidate = competitor;
 		updated = true;
 	}