Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4143557yba; Sun, 19 May 2019 11:47:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWT5Yx45nee2Xqa+aVdIB7XwDWgpbxl8HMFlVTiMVTg1EuCg3tF2ve8p6tqw745w5YuTEf X-Received: by 2002:a65:6145:: with SMTP id o5mr70837131pgv.262.1558291666560; Sun, 19 May 2019 11:47:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558291666; cv=none; d=google.com; s=arc-20160816; b=GC1VULhYhEe1FqBXKSEAspqH/6mpM6ryP0q7Hf5aBd8JEKOaBCFp8GCdCAhkc5k+UG St3mSqBDwboCcz45aAEIoisrroArWpGKcV5um9GQu1yhx13JoE1e8p/InWAOG0yeQU6+ KqI/fsda0Zq8l56AaIBKGRgJpnLN6EKQTVr94koj2G5A5wJ7aALIPl4N5ytK87TO/2xy DOo7RQ+7nerj2sz+AxIYcgOonkmIJaeKaGWKCarT2URmemWiw4j/nve2WLlEIA1xZvfI IYyXJd9Nv1M8Ey/tXb1BnF7D1SftoZEb+1jbfTglWymI3WC7/MfQPxrxX1CiF3Qak6oT EikA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=2aJVDwIx9CNCJgquAEUdJfowE2zu/TP85bAx23aqgcE=; b=RYD1JXGpvspiZBPZwvPwLBodoq/jARB4wfnD+vTuT8Pz8tE7WCAmHTOIYSlxt1EWYl 6dLMGTOSVhnt4lrY9EwEJsxog1vPfEJ+5jPDkPK/JUlIU4pQsW8qkBaiic/EzbylW0xn HwiHdjlpnEv/i9rq6c8qwE3ZRcy9qyqzGiCgWYPvKk0Z+8+ar/hbVuEPyoBtEPCL/a70 h+TnTw9zvA60HdIGWlLRQbSR6r3q96BO9gaexwxGf0dVXOdp6DTF6ugU1V8Ye6dRSAQM mrlEuLrjn/hLCQaOqKS7pgBILbuLdHMtKnxZTJKxPFL4kSmnEcWN8TGW9H9arZBd8sA7 a19g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aa1xhBGV; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1si1085189plk.50.2019.05.19.11.47.21; Sun, 19 May 2019 11:47:46 -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=@gmail.com header.s=20161025 header.b=aa1xhBGV; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727115AbfESRMe (ORCPT + 99 others); Sun, 19 May 2019 13:12:34 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:39631 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725766AbfESRMe (ORCPT ); Sun, 19 May 2019 13:12:34 -0400 Received: by mail-pg1-f193.google.com with SMTP id w22so5612557pgi.6 for ; Sun, 19 May 2019 10:12:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=2aJVDwIx9CNCJgquAEUdJfowE2zu/TP85bAx23aqgcE=; b=aa1xhBGV+J6MUtB32Shj+5dPHvNdaqFAnSUVX2fFGJSKdL62Clq1dNrTbNuhBZxCOg 19a+Bbu50onEJQS/Vqmzcjl47CKbkJ8sj5jM/NPFw5mrhv942OOjwHDJE0QhP1w+6zZf mPIWoXmcpbXCTQGFBnrnE6wMgKkap7wymXycMEkT9WWwv+aAd4xBQ5BqDP5M9X3PTxfZ n79Uj7yFVO/tdfrDtb121GelXnybzzqQZ6A8l8rsbGa4JkeEa05RH+Ora5oMf8PYj/v8 axxgVQHGFBrCp1dC/dtFDbgvYfOaoRkkFrVJafB3kxZJmllbPEAU5bWDyIazb8YJKv5j TlVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=2aJVDwIx9CNCJgquAEUdJfowE2zu/TP85bAx23aqgcE=; b=D67yzSuKsDdkSsbdKJhT/XVMDRaSAIUN+VIdA7bloEKLw4JixvyAlWiERimGFXqO1t Tnl7pye4VUHyjcAn6g9rB3oA8LJPoFmwreq1F0yvppGU8TSG9EVmaEu7RiZ0M2zsqRsG ROfnKiHNweyN6xwYF1ZGogpgyFPWPiciu62IipRdc3zMLy354fwXW1CXTGNTOLYenh4i GdYK0EDLijbqL24tioiaA+3HRr3QmrlIAyckzMQaVmIcYsqvxE/l6dec4qdefXLRpvpg sIm4k9BNGwuRuV05b0zVfc0jIBjpWWGIpYE3KpXXvR7GvJD6hAqhJ/stv9RZP/orgdi3 E9tg== X-Gm-Message-State: APjAAAVEA6JguJkxwGvkT9bb68C69/71qe/tX3RhO3ITmxOVQUXkjpSz JgIjELO599TIAfacEmGuNERn5IF0oz8= X-Received: by 2002:aa7:9289:: with SMTP id j9mr30426595pfa.251.1558285953896; Sun, 19 May 2019 10:12:33 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.73]) by smtp.gmail.com with ESMTPSA id c76sm28951727pfc.43.2019.05.19.10.12.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 May 2019 10:12:33 -0700 (PDT) Date: Sun, 19 May 2019 22:42:27 +0530 From: Hariprasad Kelam To: Greg Kroah-Hartman , 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: [PATCH] staging: rtl8723bs: core: rtw_mlme_ext: fix warning Unneeded variable: "ret" Message-ID: <20190519171227.GA8089@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; } @@ -1885,7 +1884,6 @@ unsigned int OnAtim(struct adapter *padapter, union recv_frame *precv_frame) unsigned int on_action_spct(struct adapter *padapter, union recv_frame *precv_frame) { - unsigned int ret = _FAIL; struct sta_info *psta = NULL; struct sta_priv *pstapriv = &padapter->stapriv; u8 *pframe = precv_frame->u.hdr.rx_data; @@ -1917,7 +1915,7 @@ unsigned int on_action_spct(struct adapter *padapter, union recv_frame *precv_fr } exit: - return ret; + return _FAIL; } unsigned int OnAction_back(struct adapter *padapter, union recv_frame *precv_frame) -- 2.7.4