* [Patch v2 3/3] staging: rtl8723bs: hal: sdio_halinit: fix Comparison to NULL
@ 2019-06-14 2:55 Hariprasad Kelam
0 siblings, 0 replies; only message in thread
From: Hariprasad Kelam @ 2019-06-14 2:55 UTC (permalink / raw)
To: Greg Kroah-Hartman, Hariprasad Kelam, devel, linux-kernel
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@gmail.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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-06-14 2:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-14 2:55 [Patch v2 3/3] staging: rtl8723bs: hal: sdio_halinit: fix Comparison to NULL Hariprasad Kelam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox