2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 20:53:53 +08:00

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>
This commit is contained in:
Chi Pham 2014-03-18 23:10:50 +01:00 committed by Greg Kroah-Hartman
parent 3b77f472c3
commit 792f32ac64

View File

@ -1974,18 +1974,18 @@ 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)
if (c2h_evt != NULL &&
c2h_evt_read(adapter, (u8 *)c2h_evt) != _SUCCESS)
continue;
}
}
/* Special pointer to trigger c2h_evt_clear only */
if ((void *)c2h_evt == (void *)evtpriv)