Commit 2b5a10a9 authored by Ivan Safonov's avatar Ivan Safonov Committed by Greg Kroah-Hartman

staging: rtl8188eu: do .. while (0) loop replaced by while (...) loop

It is a simple and clear representation of this loop.
Signed-off-by: default avatarIvan Safonov <insafonov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3913c19a
......@@ -242,15 +242,11 @@ int rtw_cmd_thread(void *context)
pcmdpriv->cmdthd_running = false;
/* free all cmd_obj resources */
do {
pcmd = rtw_dequeue_cmd(&pcmdpriv->cmd_queue);
if (pcmd == NULL)
break;
while ((pcmd = rtw_dequeue_cmd(&pcmdpriv->cmd_queue))) {
/* DBG_88E("%s: leaving... drop cmdcode:%u\n", __func__, pcmd->cmdcode); */
rtw_free_cmd_obj(pcmd);
} while (1);
}
up(&pcmdpriv->terminate_cmdthread_sema);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment