Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161714AbbKFPSy (ORCPT ); Fri, 6 Nov 2015 10:18:54 -0500 Received: from mail-lf0-f52.google.com ([209.85.215.52]:35433 "EHLO mail-lf0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161301AbbKFPSw (ORCPT ); Fri, 6 Nov 2015 10:18:52 -0500 Date: Fri, 6 Nov 2015 22:17:29 +0700 From: Ivan Safonov To: devel@driverdev.osuosl.org Cc: Greg Kroah-Hartman , Ivan Safonov , Larry Finger , Vaishali Thakkar , Bryan Paul , linux-kernel@vger.kernel.org Subject: [PATCH 1/3] staging: rtl8188eu: goto replaced by 'else' branch Message-ID: <20151106151729.GA12136@alpha.sfu-kras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1502 Lines: 54 goto is not needed here. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 1d03727..c0fff77 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -201,23 +201,20 @@ _next: if (rtw_cmd_filter(pcmdpriv, pcmd) == _FAIL) { pcmd->res = H2C_DROPPED; - goto post_process; - } - - if (pcmd->cmdcode < ARRAY_SIZE(wlancmds)) { - cmd_hdl = wlancmds[pcmd->cmdcode].h2cfuns; - - if (cmd_hdl) { - ret = cmd_hdl(pcmd->padapter, pcmd->parmbuf); - pcmd->res = ret; - } } else { - pcmd->res = H2C_PARAMETERS_ERROR; - } + if (pcmd->cmdcode < ARRAY_SIZE(wlancmds)) { + cmd_hdl = wlancmds[pcmd->cmdcode].h2cfuns; - cmd_hdl = NULL; + if (cmd_hdl) { + ret = cmd_hdl(pcmd->padapter, pcmd->parmbuf); + pcmd->res = ret; + } + } else { + pcmd->res = H2C_PARAMETERS_ERROR; + } -post_process: + cmd_hdl = NULL; + } /* call callback function for post-processed */ if (pcmd->cmdcode < ARRAY_SIZE(rtw_cmd_callback)) { -- 2.4.10 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/