summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMarcelo Aloisio da Silva <marcelo.as@aol.com>2022-02-18 01:01:40 -0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-02-21 18:10:16 +0100
commit2b92c3946ea7b223c3a418f3f423bd1711f723f7 (patch)
treeb03c37135784df96bb54ff1d7a7b06318b1a402a /drivers
parent4fcc0c275e3f59cd68f977c57953783f8014ed15 (diff)
downloadlinux-2b92c3946ea7b223c3a418f3f423bd1711f723f7.tar.bz2
staging: r8188eu: move out assignment in if condition
Should not use assignment in if condition. Signed-off-by: Marcelo Aloisio da Silva <marcelo.as@aol.com> Link: https://lore.kernel.org/r/20220218040140.GA22796@snoopy Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/r8188eu/core/rtw_cmd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index 46a49f30f900..6eca30124ee8 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -1318,7 +1318,8 @@ static void c2h_wk_callback(struct work_struct *work)
evtpriv->c2h_wk_alive = true;
while (!rtw_cbuf_empty(evtpriv->c2h_queue)) {
- if ((c2h_evt = (struct c2h_evt_hdr *)rtw_cbuf_pop(evtpriv->c2h_queue)) != NULL) {
+ c2h_evt = (struct c2h_evt_hdr *)rtw_cbuf_pop(evtpriv->c2h_queue);
+ if (c2h_evt) {
/* This C2H event is read, clear it */
rtw_write8(adapter, REG_C2HEVT_CLEAR, C2H_EVT_HOST_CLOSE);
} else {