Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4089364yba; Sun, 19 May 2019 10:24:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqxkLxmT4n6nII9+oH9ZGVZO0u+GPZvkQg05M2rWw6+7ZKs0Mw8ONuljbteHHmk24Pc78We4 X-Received: by 2002:a63:5c4c:: with SMTP id n12mr70985731pgm.111.1558286666578; Sun, 19 May 2019 10:24:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558286666; cv=none; d=google.com; s=arc-20160816; b=AyKRfUFTnhaWRLX/jgcs30uP7up1bGl9JUQf7r6DtVAQTgu7D4bKldvJYzlW7YDbbR dswIOXwkQ7Of8eXfupLPCf7SMTlau8k9uL2j20tJV/NGnUqCUoiXkk8EH86EJuVifumg 3nIHjACcrKu8onuhV2n0FsGwktCyww3a3O8hNUGNs6Je6sdc+dY34m+sWg7d/1Hvx3vP h3guznm8P/qeIXWSjhkPeVmrCxo2Se7xaCu3E1Xq3MQ10Ox/5lhoDOBCEWAt/JgmZgeI MHbntosl/dzEjPTF8s7tiofFH42e/1YdqvMDV5cegfr/ssbAC86s8SMzHnztNwO14a7L 0F8A== 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=onWg9sXJkwr5YDouwUnwMigAm53+6Ypsow5mIz9jnVY=; b=sfaC+HGSlpBxrg6j4iePKGQhjVXMMAbaoYYBEc57xc5olsQ/vfN1tNBKQ7MzTAknUl EnkExq0SdrMfgnbiiJXvuI/Qrx2OVX/942ehS+1XV4usWFynQMUXnNGA6n2kmFu9Up6k DKp+gfz8r8/wB9b0caX/zUmHsEgeJxbXDX+BeYsbn+rAp4JD4n4x2mDvD7qo7NBC/0/l zCF7kgxWmJLlPCyiQtqr6hTPGYk+XqeObAWK28lWADBZ3KkkAvcI3Sq4q3Bbpt+NBl3c 8J614pHmK3ErXT0urExE97DGQwx3A54t5yHvb1Fe4nCV+9fsBHkcAHYmU7d4ZD4GRU1U gu6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DsCB2O3R; 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 92si10777738plw.163.2019.05.19.10.24.12; Sun, 19 May 2019 10:24:26 -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=DsCB2O3R; 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 S1726741AbfESROh (ORCPT + 99 others); Sun, 19 May 2019 13:14:37 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:45691 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725766AbfESROh (ORCPT ); Sun, 19 May 2019 13:14:37 -0400 Received: by mail-pl1-f194.google.com with SMTP id a5so5572603pls.12 for ; Sun, 19 May 2019 10:14:37 -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=onWg9sXJkwr5YDouwUnwMigAm53+6Ypsow5mIz9jnVY=; b=DsCB2O3R3rEIST8TFYsL76ySpcSxa2N2xCasptSobJ7Wpiu/A0m518d6+7QBQGFRRe qxABKKsMQLE3ZKvSzzNSkx2REVO//M3z/mKDpfR607d35S9GYBB6N5kA581JGnG0E6lj CU7RGFMW9ERAIRyjjRthI71b2jjKaLqFt9V5eh83suyYye+DNItxj6Y4E5c9f3BXD2sT Mkc5b6dwGR83UGASHefQCGaQ60BpSmDuqnT2v2MQl5Y0YB55O4hz0pN34SosRhf+zf46 XfvPM1yT9Nm2gR4DiqvwStHv5/LBXhO/nFnI7r6+hMSerChNlgOPhVvFtCVaugpMc7/G jp5w== 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=onWg9sXJkwr5YDouwUnwMigAm53+6Ypsow5mIz9jnVY=; b=h71JJZJ5oYbrxhmZ3cwhdQIeiydnAtm0ADXiNMWIz5AIegNFYWMhizzZGkh5Grt7p3 OE5dHPw1njNAgNzs19O8SKauRTqEv62zQ+4HcHfL9dPunQm6jCgh9sHO6EQE5XH4YCq3 exP526fUxkDVSSnrCVt+VOOVml5KeM9x1fYgOW1wgGQ/HHFVkk9e/NEKLUOeHB9bcX6n CCXRAHGtT1rJ8Dj3idYR4KuynZk3R8lflZcAfLLRznckiZ3Dq691t9HHFrKydwt+6m75 at99bUZUDcYxoOu0v73J9l3KiH1xaH6owc1RcHluhBVzk3Mcan/O3DCWVBsVWfYzZ3o6 l3lA== X-Gm-Message-State: APjAAAV88zELFnRzhss5WVNYpSzkKaxTEGqKrJbhZp0w2hfPQBnAtDVY GSnbAGGdXbUNQ7sK3CpeyKYZfmx/ X-Received: by 2002:a17:902:6a83:: with SMTP id n3mr71412894plk.109.1558284291995; Sun, 19 May 2019 09:44:51 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.73]) by smtp.gmail.com with ESMTPSA id q75sm21542256pfa.175.2019.05.19.09.44.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 May 2019 09:44:51 -0700 (PDT) Date: Sun, 19 May 2019 22:14:45 +0530 From: Hariprasad Kelam To: Greg Kroah-Hartman , Mamta Shukla , Nishka Dasgupta , Hardik Singh Rathore , Anirudh Rayabharam , Murray McAllister , Kimberly Brown , Hariprasad Kelam , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: rtl8723bs: core: rtw_ap: fix Unneeded variable: "ret". Return "0" Message-ID: <20190519164445.GA5268@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_ap.c:1400:5-8: Unneeded variable: "ret". Return "0" on line 1441 drivers/staging/rtl8723bs/core/rtw_ap.c:2195:5-8: Unneeded variable: "ret". Return "0" on line 2205 Signed-off-by: Hariprasad Kelam --- drivers/staging/rtl8723bs/core/rtw_ap.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c index bc02306..a1b5ba4 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ap.c +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c @@ -1397,7 +1397,6 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr) int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr) { struct list_head *plist, *phead; - int ret = 0; struct rtw_wlan_acl_node *paclnode; struct sta_priv *pstapriv = &padapter->stapriv; struct wlan_acl_pool *pacl_list = &pstapriv->acl_list; @@ -1438,7 +1437,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr) DBG_871X("%s, acl_num =%d\n", __func__, pacl_list->num); - return ret; + return 0; } u8 rtw_ap_set_pairwise_key(struct adapter *padapter, struct sta_info *psta) @@ -2192,7 +2191,6 @@ u8 ap_free_sta( int rtw_sta_flush(struct adapter *padapter) { struct list_head *phead, *plist; - int ret = 0; struct sta_info *psta = NULL; struct sta_priv *pstapriv = &padapter->stapriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -2202,7 +2200,7 @@ int rtw_sta_flush(struct adapter *padapter) DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(padapter->pnetdev)); if ((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE) - return ret; + return 0; spin_lock_bh(&pstapriv->asoc_list_lock); phead = &pstapriv->asoc_list; @@ -2227,7 +2225,7 @@ int rtw_sta_flush(struct adapter *padapter) associated_clients_update(padapter, true); - return ret; + return 0; } /* called > TSR LEVEL for USB or SDIO Interface*/ -- 2.7.4