staging: r8188eu: move out assignment in if condition
A message that is not in the archive (sent off-list or not yet received): 20220218040140.GA22796.ref@snoopy
PATCH 1/1 staging: r8188eu: move out assignment in if condition
Should not use assignment in if condition.
Signed-off-by Marcelo Aloisio da Silva <[email protected]>
--- drivers/staging/r8188eu/core/rtw_cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/r8188eu/core/rtw_cmd.c +2 -1
@@ -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 {
Signature · 1 line
2.25.1