Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4286875pxb; Mon, 25 Oct 2021 00:59:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzzeT7yJgRsLDc3QbUwJbPlarPooF6D8qZ0J7o2PWfPoFI85kTD9INWD5JDL51CZ+LrLGi X-Received: by 2002:a17:907:7293:: with SMTP id dt19mr1462755ejc.455.1635148795632; Mon, 25 Oct 2021 00:59:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635148795; cv=none; d=google.com; s=arc-20160816; b=m8LOIcSAe3lLoXcptJgWH0fvVIr0Mc9f23rJZCH/V/Ja4lanLNH94kceWELorbuJKW cghPkWk+788H7w/pCZ9/Sojae+JutdBR6ngNQRBPgd21t1d1U+/fYmyMCRvB3kQn3UTl eG3Md8YqULsB9hBQwc34oAMtLs3NH1F25SO3cc2Q5+zi+Lsr4ZpXJqMBt3jw01Hfk7BO UxFa6vVVwQlhWyP+cBWw3tZRKW9HHap8RitCFprMlBEml7WcpsxkYq8DFlHh88P8gjVU wfSpJMN8KJgkNwmVyrYNdIcCzmeeZ/kmePiM/pu06UOBXLE4KKYGg9pHFXBF9Vk7ND0M vGtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+LCCDd3sWnIPsuyeF2eUx7hea3n6088/1T7DbeqLSBk=; b=dcls+84RsVsdo9PHqqVKn+YsN9XXeZ6TIHidGiyAF6whxNQSwRI2u0TX72fhb9Xqlz dCjgU4L63asNRIPY4b512Qte008giLWJH9wyy6ejsCABfPXuE3UeKOA8Z8qu2K1HCEff Vj/jkTBu7h7H45BF/ULeCMUgp++iSW2Q5GxppDz4ccyAnklw0LrX1ZKWaPeEwuR0d/MG YaKIERswYyxMT7FbuZiPus2rCU55Tupz0Z2mlPMpk0jo5L10s7bzNsscFIJSq/1ntm// 2TH26FvoKSaVMmaiRC5tmRNiO491XkchspDNqvSVLOchv4J1uZ3m4mgSgwhuEOKGZXz7 N+eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BZlChCmF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 8si19911864ejx.341.2021.10.25.00.59.30; Mon, 25 Oct 2021 00:59:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BZlChCmF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230177AbhJYG7w (ORCPT + 99 others); Mon, 25 Oct 2021 02:59:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:55694 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229727AbhJYG7v (ORCPT ); Mon, 25 Oct 2021 02:59:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D9AA760EE9; Mon, 25 Oct 2021 06:57:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1635145049; bh=qXTrgFKBZ/n7lg4e/LDWfdvUn0D7rhQ2YdfqbfD2apQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BZlChCmFlmiM7n7WytFjcrMvNPs1N1M4pBJ66VE63SYxU8JCCE5OyEJqZHL87p4SB +m8zAPE3VM0/8ncNrY8d/Yr8TYKghBDlLYnRyqiLUDwOvGHA/6S1tJ6LD1lzsRLXux 8kN66AlLiSijQX0dUf1zXyZWSPdUVY8Z+ijjoREQ= Date: Mon, 25 Oct 2021 08:57:27 +0200 From: Greg KH To: Saurav Girepunje Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk, straube.linux@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, saurav.girepunje@hotmail.com Subject: Re: [PATCH] staging: r8188eu: avoid use of goto statement Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 25, 2021 at 10:28:54AM +0530, Saurav Girepunje wrote: > Remove the goto statement from _rtw_init_cmd_priv(). In this function > goto statement can be replace by return statement. By replacing the > goto statement with return statement local variable "res" is also > not required.As on goto label exit, function only return it is not You need a ' ' after the '.' here please. > performing any cleanup.Avoiding goto will simplify the function. Same here. > Signed-off-by: Saurav Girepunje > --- > drivers/staging/r8188eu/core/rtw_cmd.c | 16 +++++----------- > 1 file changed, 5 insertions(+), 11 deletions(-) > > diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c > index e17332677daa..22046bd5cf82 100644 > --- a/drivers/staging/r8188eu/core/rtw_cmd.c > +++ b/drivers/staging/r8188eu/core/rtw_cmd.c > @@ -19,7 +19,6 @@ No irqsave is necessary. > > static int _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) > { > - int res = _SUCCESS; > Please also remove the extra blank line. thanks, greg k-h