Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp318414ybi; Sat, 29 Jun 2019 11:28:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEWeL2hQoFUjsfDhAmP+fKFi5jiFbPeahfK/7O7JyKRX920Ha0YgtZNPseRZoFwv8xJNjy X-Received: by 2002:a17:90a:338b:: with SMTP id n11mr20464762pjb.21.1561832914804; Sat, 29 Jun 2019 11:28:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561832914; cv=none; d=google.com; s=arc-20160816; b=J999HmP68BzufGSy9jlprpcDOhsAHqFPN9ObUdBlhH9ZEgTmN02+aI43ctec1a5miL 6LmASFL8hhTflwGqaUdW7Y55FpbWs04hgtp7UtNin7ZURVVW9hRvzHWfgbSjfomkXmGU UwJD2KoqoLP0amVxSYdb0m7vd5lDdQMtv/2IrJXr2GxZSZzm7m5IQfFbP0oPj7uz9c5l BMHcrrNZ2YPu150n4kDMeB61Kt9i1MqVLzI2doIg9CvThKiPVQghs7K8O9bi9g9ENH9Q Rrfp/a9zwVkShDtnK0ZN6kD1+X1aCta6Cc0WFASLyXsqkRVEaa53mUJ85Mf4eQrCM1JM UctA== 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=0AQq5+Vp+iXDTeJ3o4QHOhInjIIqHgZpcbiK10bqgAM=; b=PFMFooRAUVElh4jrXhoypopcqYsC+fbFa76SKjJ0RCb3OwpykGVAkcvNsWcYRb0/31 S6+w3Xv+7rh2SsD7vgZaNMmph5VSmh7tbeCA5Y6a+7mrfSVwky7iOGLJ1L3P2bvNTTC0 mKbCIzOYfA1docczWPCKcHwLq3KDqT+nwO54lM4KboMS5z4SAZLJ/GmFqbzJbqxwbfM1 9oU8whPaLnYAguEDcw/aC03/D3NMtojWAmo5M1tgmj96PdoDNKE2AD1QWyv+oF0EcjVM ZpwjP004M5IdighzThgy1/ts2D4e2mETCvb+0B36PcFDSKD9I5YRbqbRdpzh1+tCD6uH 5j4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=D7k9iNR7; 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 91si5485758plb.39.2019.06.29.11.28.17; Sat, 29 Jun 2019 11:28:34 -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=D7k9iNR7; 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 S1726906AbfF2S05 (ORCPT + 99 others); Sat, 29 Jun 2019 14:26:57 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:45347 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726872AbfF2S05 (ORCPT ); Sat, 29 Jun 2019 14:26:57 -0400 Received: by mail-pl1-f194.google.com with SMTP id bi6so5032409plb.12 for ; Sat, 29 Jun 2019 11:26:56 -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=0AQq5+Vp+iXDTeJ3o4QHOhInjIIqHgZpcbiK10bqgAM=; b=D7k9iNR7pd51jAEyBLiLrYZjx2Oio8czS27/BNqc7Bi2lJR7CCbpGnLt9mcSGaZ8tZ MMWwgA1dTkZZkZht4IS5ITJP/FlXuPAn0Fm0tzCEkuaZoxLQemw6lJ9tAeabX4iFcPx8 yMIqWnSzVZ9vXqSNXL96ePGr4DKVtP1TYZYiWVrrfprg/b+SJu+JvjYfPCG89UtrpUl1 n2jp9j8M6hSlBS36mbWfwAIXeqcncOz/5pA7N0/YzjMhWs8Sj7IcTNlBC70lCaZDkXKw oCFMEL35oKPaO2H9o7cr9PHl1Yz71vDBDFYmieTUqHQsaGHpuiUZ13Zc47+/zA6GE6Hd ZGmw== 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=0AQq5+Vp+iXDTeJ3o4QHOhInjIIqHgZpcbiK10bqgAM=; b=cNBvZVnZCTWTa21MkJw70KuGvHe652Q9bsGk+Lwhp9lOKt6beyTYO9daqa51hK8RSO GgQf6kDRd1agKX3CL4eA8y21hlsI77gK0bYQfmCGAz5nAwyRMqISf6TBpXlJCdKKnvqc 4bFeTsnsiudQpaIPEK2L5GRvOqh5ZYaxWAIKxS7ADpkQWvrAkcnnaPgIXG4vQuLxbR3O HMgZERGZQqmG4lyqiMVfjibaw/pZi7B2QpXEmc+JvaWkOK0Mgm55s+T4uc3nenrQuVql ggziC26J9J/GkrlB/bVuNWiEUwiNGR2UaojNDV5EwYT7zSDv6FXezELdI7AhL1k7HWE5 ucrw== X-Gm-Message-State: APjAAAUKbbBAlnVnZSwHUGdvcyEJ38XCeXwdoCB/3R9ztSetffBaqaU2 FeOiAk77dtbulS+X4qtNMOU= X-Received: by 2002:a17:902:b093:: with SMTP id p19mr18443296plr.141.1561832816301; Sat, 29 Jun 2019 11:26:56 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.187]) by smtp.gmail.com with ESMTPSA id z20sm12267284pfk.72.2019.06.29.11.26.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Jun 2019 11:26:55 -0700 (PDT) Date: Sat, 29 Jun 2019 23:56:50 +0530 From: Hariprasad Kelam To: Larry Finger , Greg Kroah-Hartman , Michael Straube , Hariprasad Kelam , Florian =?iso-8859-1?Q?B=FCstgens?= , Bhaskar Singh , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging/rtl8188eu/os_dep: Remove unneeded variable ret Message-ID: <20190629182650.GA9138@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 Below list of functions returns 0 in success and -EINVAL in failure. So directly return 0 on Success. Signed-off-by: Hariprasad Kelam --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index eaa4adb..d9d0462 100644 --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c @@ -2508,7 +2508,6 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param) static int rtw_del_sta(struct net_device *dev, struct ieee_param *param) { - int ret = 0; struct sta_info *psta = NULL; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); @@ -2538,7 +2537,7 @@ static int rtw_del_sta(struct net_device *dev, struct ieee_param *param) DBG_88E("rtw_del_sta(), sta has already been removed or never been added\n"); } - return ret; + return 0; } static int rtw_ioctl_get_sta_data(struct net_device *dev, struct ieee_param *param, int len) @@ -2636,7 +2635,6 @@ static int rtw_get_sta_wpaie(struct net_device *dev, struct ieee_param *param) static int rtw_set_wps_beacon(struct net_device *dev, struct ieee_param *param, int len) { - int ret = 0; unsigned char wps_oui[4] = {0x0, 0x50, 0xf2, 0x04}; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); @@ -2668,12 +2666,11 @@ static int rtw_set_wps_beacon(struct net_device *dev, struct ieee_param *param, pmlmeext->bstart_bss = true; } - return ret; + return 0; } static int rtw_set_wps_probe_resp(struct net_device *dev, struct ieee_param *param, int len) { - int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); int ie_len; @@ -2698,12 +2695,11 @@ static int rtw_set_wps_probe_resp(struct net_device *dev, struct ieee_param *par memcpy(pmlmepriv->wps_probe_resp_ie, param->u.bcn_ie.buf, ie_len); } - return ret; + return 0; } static int rtw_set_wps_assoc_resp(struct net_device *dev, struct ieee_param *param, int len) { - int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); int ie_len; @@ -2729,12 +2725,11 @@ static int rtw_set_wps_assoc_resp(struct net_device *dev, struct ieee_param *par memcpy(pmlmepriv->wps_assoc_resp_ie, param->u.bcn_ie.buf, ie_len); } - return ret; + return 0; } static int rtw_set_hidden_ssid(struct net_device *dev, struct ieee_param *param, int len) { - int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); @@ -2754,7 +2749,7 @@ static int rtw_set_hidden_ssid(struct net_device *dev, struct ieee_param *param, value = 0; DBG_88E("%s value(%u)\n", __func__, value); pmlmeinfo->hidden_ssid_mode = value; - return ret; + return 0; } static int rtw_ioctl_acl_remove_sta(struct net_device *dev, struct ieee_param *param, int len) @@ -2787,7 +2782,6 @@ static int rtw_ioctl_acl_add_sta(struct net_device *dev, struct ieee_param *para static int rtw_ioctl_set_macaddr_acl(struct net_device *dev, struct ieee_param *param, int len) { - int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); @@ -2796,7 +2790,7 @@ static int rtw_ioctl_set_macaddr_acl(struct net_device *dev, struct ieee_param * rtw_set_macaddr_acl(padapter, param->u.mlme.command); - return ret; + return 0; } static int rtw_hostapd_ioctl(struct net_device *dev, struct iw_point *p) -- 2.7.4