diff options
author | Chi Pham <fempsci@gmail.com> | 2014-03-09 15:07:15 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-18 10:46:37 -0700 |
commit | fb0a1bb293885075f2cd4e2fefd9e04519782900 (patch) | |
tree | f9d272548eb23222f2cf60d331fc7251379bab5f /drivers | |
parent | b6657bfb48983908cb70eb69a7898309e56f0134 (diff) |
staging:rtl8188eu: Removed assignments in if statements.
Fixed some indentation to silence (some) checkpatch errors.
The following coccinelle script found the match:
@@
expression E0, E1, E2;
statement S0, S1;
@@
- if ((E1 = E2) != E)
+ E1 = E2;
+ if (E1 != E)
S1 else S2
Signed-off-by: Chi Pham <fempsci@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/rtl8188eu/core/rtw_cmd.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 8c548817da9..016e55be33e 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -1974,13 +1974,17 @@ 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 != NULL) { /* This C2H event is read, clear it */ c2h_evt_clear(adapter); - } else if ((c2h_evt = (struct c2h_evt_hdr *)rtw_malloc(16)) != NULL) { + } else { + c2h_evt = (struct c2h_evt_hdr *)rtw_malloc(16); + if (c2h_evt != NULL) { /* This C2H event is not read, read & clear now */ - if (c2h_evt_read(adapter, (u8 *)c2h_evt) != _SUCCESS) - continue; + if (c2h_evt_read(adapter, (u8 *)c2h_evt) != _SUCCESS) + continue; + } } /* Special pointer to trigger c2h_evt_clear only */ |