Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4755573yba; Mon, 20 May 2019 03:15:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzTJ+hsb51K0xt4VqK7SicbPhT3MlmqTM8dcDmUWoJNdlHathIaXC76jbhUIdOWdVjwYdEs X-Received: by 2002:a17:902:7895:: with SMTP id q21mr71319528pll.73.1558347332347; Mon, 20 May 2019 03:15:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558347332; cv=none; d=google.com; s=arc-20160816; b=BlgLXzFM4iRcfWkASnKzqKtFIjjnPiwOv0tRie7HEY/wkBFukwUq8nARcvcGlLoF6M bNcwHKyIn17LicGuMNCB89I2kRihI+P1KPyFrOStd4afWHQTz1YC7Bz/4nIK5qGBi2sg vbol+epUcehrTsddsR6lMnTyZpra40yYiFV0Fe8+UX7qSFYPzd8JCOq/toZ5fJKB9NSV vumLZdiWc+fE2lXJ8DFbWScqKP4jbRyM6bpK43w7kIh0OPozGFuv8Wsf422pPfC9qgDH edU3s/OVEBg4cexQe0I12hlru6RdJsU7x6rvrrcB485YiDxV6naszsAy518vFnFnHIJK 2sdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=x0slPQnzboPgMk/OJlbMTBKVBb4iLgaJuQ53Ranuz5w=; b=VgYJYzR9XmCfl2SrS00NJJO6uku8XPXq0hCx+YLFAeZRQnLaa3pz73YKuBWC5ufFaZ On14Qvn1Snle5imBnfN/OodbgOTyTVWqVcqf0xsiO5wkv9GKTLdb/VitZR0jL9T+Bmol xYIiljWu9T6Ky9JjqJFWDXZVuy/bAAMUlT2Tt7sCgLjDqsYnuACVjx+mIdsCBgLC0rDu /xGUpdpJsK7ainM8CE6TMgjXndZZ5N9SnTiKuua5Rlcs9U5PywE3zVi4s0R86exP4vD6 sL3DWRXXL1661hTXxIOWJz8Lb923AHDRpfHnoG6j6A/4l5hVT8PR+ltcJ76RJdSvFT3g BuGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=O5F6SFVQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10si17562856pgt.412.2019.05.20.03.15.16; Mon, 20 May 2019 03:15:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=O5F6SFVQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731689AbfETIzn (ORCPT + 99 others); Mon, 20 May 2019 04:55:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:57224 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730823AbfETIzm (ORCPT ); Mon, 20 May 2019 04:55:42 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 482B2204FD; Mon, 20 May 2019 08:55:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558342541; bh=Oee/c2MDV3HNg8hnxn5HjjMAZd7qfmNnxGQ5OCvwopI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=O5F6SFVQ3q7yTeuTaEgQdA4PTRRLzNIx/A0ruDGhMl2xgHlouZPiVEYr9s/bj2pBJ K8LpDTVsB6Y8VQsty+TM43JBqHxZYQJIy5eyIXTY6uVmKUMhT/hjqM1sD0U1KPZFIQ HVpTsw4KwlXfaRSlvs9gfk4l9jDIM7BxzKH0pRrg= Date: Mon, 20 May 2019 10:55:39 +0200 From: Greg Kroah-Hartman To: Hariprasad Kelam Cc: Emanuel Bennici , Vatsala Narang , Nishka Dasgupta , Young Xiao , Aymen Qader , Henriette Hofmeier , Hardik Singh Rathore , Madhumitha Prabakaran , Michael Straube , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: rtl8723bs: core: rtw_mlme_ext: fix warning Unneeded variable: "ret" Message-ID: <20190520085539.GD19183@kroah.com> References: <20190519171227.GA8089@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190519171227.GA8089@hari-Inspiron-1545> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 19, 2019 at 10:42:27PM +0530, Hariprasad Kelam wrote: > This patch fixes below warnings reported by coccicheck > > drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:1888:14-17: Unneeded > variable: "ret". Return "_FAIL" on line 1920 > drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:466:5-8: Unneeded > variable: "res". Return "_SUCCESS" on line 494 > > Signed-off-by: Hariprasad Kelam > --- > drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c > index d110d45..6a2eb66 100644 > --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c > +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c > @@ -463,7 +463,6 @@ static u8 init_channel_set(struct adapter *padapter, u8 ChannelPlan, RT_CHANNEL_ > > int init_mlme_ext_priv(struct adapter *padapter) > { > - int res = _SUCCESS; > struct registry_priv *pregistrypriv = &padapter->registrypriv; > struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; > struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); > @@ -491,7 +490,7 @@ int init_mlme_ext_priv(struct adapter *padapter) > pmlmeext->fixed_chan = 0xFF; > #endif > > - return res; > + return _SUCCESS; If it can never fail, it should not be returning a value :(