From: Ivan Safonov Date: Mon, 2 Nov 2015 17:16:09 +0000 (+0700) Subject: staging: rtl8188eu: do .. while (0) loop replaced by while (...) loop X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2b5a10a923e6541f20581b0557785a55e0039436;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: rtl8188eu: do .. while (0) loop replaced by while (...) loop It is a simple and clear representation of this loop. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 9b7026e7d55b..f0ac66de34d6 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -242,15 +242,11 @@ post_process: 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);