[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220208195425.32286-1-leonardo.aa88@gmail.com>
Date: Tue, 8 Feb 2022 16:54:25 -0300
From: Leonardo Araujo <leonardo.aa88@...il.com>
To: gregkh@...uxfoundation.org
Cc: linux-kernel@...r.kernel.org, linux-staging@...ts.linux.dev,
Leonardo Araujo <leonardo.aa88@...il.com>
Subject: [PATCH] Staging: r8188eu: core: do not use assignment in if condition
This patch fixes the following checkpatch.pl warning:
ERROR: do not use assignment in if condition
Signed-off-by: Leonardo Araujo <leonardo.aa88@...il.com>
---
drivers/staging/r8188eu/core/rtw_cmd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index c7e8602d2097..d02632dc16c3 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -1329,7 +1329,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 {
--
2.29.0
Powered by blists - more mailing lists