summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8188eu
diff options
context:
space:
mode:
authorChi Pham <fempsci@gmail.com>2014-03-18 23:10:50 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-19 09:10:26 -0700
commit792f32ac6495e168521182ab96d7816c927b7413 (patch)
treebfcbeeb24e9cb1ac5571d0cf6d4a5fd2f91963f1 /drivers/staging/rtl8188eu
parent3b77f472c3d9ebc85e9577d92aebceae2c8380c6 (diff)
staging: rtl8188eu: Reduced nesting and improved coding style.
Signed-off-by: Chi Pham <fempsci@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu')
-rw-r--r--drivers/staging/rtl8188eu/core/rtw_cmd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c
index 016e55be33e4..c2fb050337d5 100644
--- a/drivers/staging/rtl8188eu/core/rtw_cmd.c
+++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c
@@ -1974,17 +1974,17 @@ static void c2h_wk_callback(struct work_struct *work)
evtpriv->c2h_wk_alive = true;
while (!rtw_cbuf_empty(evtpriv->c2h_queue)) {
- c2h_evt = (struct c2h_evt_hdr *)rtw_cbuf_pop(evtpriv->c2h_queue);
- if (c2h_evt != 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 {
+ 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 != NULL &&
+ c2h_evt_read(adapter, (u8 *)c2h_evt) != _SUCCESS)
+ continue;
}
/* Special pointer to trigger c2h_evt_clear only */