[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20190614025519.GA3459@hari-Inspiron-1545>
Date: Fri, 14 Jun 2019 08:25:19 +0530
From: Hariprasad Kelam <hariprasad.kelam@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Hariprasad Kelam <hariprasad.kelam@...il.com>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [Patch v2 3/3] staging: rtl8723bs: hal: sdio_halinit: fix Comparison
to NULL
This patch fixes below issue reported by checkpatch
CHECK: Comparison to NULL could be written "psta"
CHECK: Comparison to NULL could be written "psta"
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@...il.com>
-----
changes in v2: Send proper patch with out corruption
----
---
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index 5c7cff0..6f10349 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -1558,7 +1558,7 @@ static void SetHwReg8723BS(struct adapter *padapter, u8 variable, u8 *val)
DBG_871X_LEVEL(_drv_always_, "WOWLAN_DISABLE\n");
psta = rtw_get_stainfo(&padapter->stapriv, get_bssid(pmlmepriv));
- if (psta != NULL)
+ if (psta)
rtl8723b_set_FwMediaStatusRpt_cmd(padapter, RT_MEDIA_DISCONNECT, psta->mac_id);
else
DBG_871X("psta is null\n");
@@ -1673,7 +1673,7 @@ static void SetHwReg8723BS(struct adapter *padapter, u8 variable, u8 *val)
(pwrctl->wowlan_wake_reason != Rx_DeAuth)
) {
rtl8723b_set_FwJoinBssRpt_cmd(padapter, RT_MEDIA_CONNECT);
- if (psta != NULL)
+ if (psta)
rtl8723b_set_FwMediaStatusRpt_cmd(padapter, RT_MEDIA_CONNECT, psta->mac_id);
}
#ifdef CONFIG_PNO_SUPPORT
--
2.7.4
Powered by blists - more mailing lists