Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1100893ybi; Sat, 15 Jun 2019 20:27:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9t69wvymeYketG74l23kpXJnhoZTx0q5ijDt22gkhEcv0TrBG4ZvYgvzVzQCKxjclRwJf X-Received: by 2002:a17:90a:cd03:: with SMTP id d3mr18333447pju.127.1560655662250; Sat, 15 Jun 2019 20:27:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560655662; cv=none; d=google.com; s=arc-20160816; b=k/TdqUJ7DfGwMjR1OeSgv9QE4VU58Wgg1zHxFsFUi37LKvFJ901d47sRaQzwwJhT22 X1u1c41eOuSNRzEwAE8wQztXfo2jvG0J0LXmmOa25qi6FKcN99g15nj4TFcQND9FFW3l 7KpqinZY1tAM2pjCdbqnSIYpkeVDPjjNErLjvG6xFGBlpuyx4WJqsXaKXh5JYMfndnQB HeAU99V3HUGAEgCmlmRuQmY/1AAcmacvdyuMiC1BAIDp3EgC54r83soetJEJSbO0D0IV TOjPPVvRShhMeBwCUYyS2OND0ZISsUa2ldPfKXyu6OeiM0+IgHupeB2HCIG3DN/Eo40/ GtVA== 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=468/RLQKpIqiti2//KMB81NPRyvxXX0VssP8ZgLdNtw=; b=BdDyUtgdPNgvY8mjhQqqtq0b9U9QzUKpExGTfC3h8Em6ML8uYWT8rc1ah1VLzc1pgB OGLYTYm5JhWiN4q+BrBdLi/ViTsibXDjBZn9V7o9QOf3mL+cG0ADwFjrOOOfZvFPVULe Hwg5dgJLZx8mfA9opx8nkyAxWwiuGeG8g6oKy5+f+WSIdQVUwnysiuCT2VOlwNt94OQg CrYQ7DFF2g0/xC1I52yB+c1IcrMeIZAXqTlpAOsyBlRDYTN4A2Ap+HJM4un28UMmDJpe zTmr0iyCBa5y7ynSK+v4artBG9gcfD27QUit2UfU+pkhDcIX1rxWghpAUt9vScONNbOw il0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=etPgZwUY; 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 h11si6228438pls.374.2019.06.15.20.27.14; Sat, 15 Jun 2019 20:27:42 -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=etPgZwUY; 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 S1727044AbfFPD1L (ORCPT + 99 others); Sat, 15 Jun 2019 23:27:11 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:39209 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726870AbfFPD1L (ORCPT ); Sat, 15 Jun 2019 23:27:11 -0400 Received: by mail-pg1-f193.google.com with SMTP id 196so3838844pgc.6 for ; Sat, 15 Jun 2019 20:27:11 -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=468/RLQKpIqiti2//KMB81NPRyvxXX0VssP8ZgLdNtw=; b=etPgZwUYVMabvNDiHfuYDthpUixrKax2+vMU4U4qKFIZgDXih3zHnvdcziRLeDFBwE 3r02ZYAJ6PPrd/9EyK519Q4MaJM0LyY7ELMOhfmOpvHXiDDEZG5zMIpFeZUp91y1c1dZ KNdLhUSb0Be7TIcKPX05hh9pOUQWPrq12TN94NvoBEZIOMtF+R8sO6GrHJLzW64b5yWj YUljYcSIlSmYHDxt6TWxpl0O52wg2FBQJJ/TR34tO7HFL2YaNS+QBdPn/UINxqsAIYCb bFDkHnLd9QhcPS4og/ivqLTsmP+BGVwrln/7p90gQWRdlVttNjoNjEeRCp9T233Uwgfv GugA== 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=468/RLQKpIqiti2//KMB81NPRyvxXX0VssP8ZgLdNtw=; b=MYGTcC58R4pb5shwygPGgvp76tmtNpB3IChgpHHBE4JFdRlYQ7FTaKpU1iJX/dw/zo /FoVw0J/q7aT4yqsNE1mqpkhLWKoV7qbcLSh9Sq6rv4EyPK84Amkr40owPvjn7m2rvGy H0Bwb+YloAU3jzJM5iQsC8S1eyFHEWkxuhQp+8rP+8ta1CIc/IaXxZiKUtRvxJsDMqFn U+65x75CMNoFqbkJdbtAMbS1Jwdr/Z64qF9DqCRe5inQRRM5neCnggTL7LFSEJoxJbGE QaDWfRumNy3lu9ax6SwAaBvURjiDu9Gh5VFoj/UDLhQnt8RXCsy5zE5Oy+h0JWLcebMc q46A== X-Gm-Message-State: APjAAAWTumpyf3+bmHsCXVvRViznFna7djAKorD6YEZWXgryUO8MOFqr l67pyDMDHa50ugo1/RqRWdE= X-Received: by 2002:a17:90b:8d2:: with SMTP id ds18mr19685197pjb.132.1560655630682; Sat, 15 Jun 2019 20:27:10 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.89.153]) by smtp.gmail.com with ESMTPSA id 125sm4615801pfg.99.2019.06.15.20.27.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 Jun 2019 20:27:10 -0700 (PDT) Date: Sun, 16 Jun 2019 08:57:05 +0530 From: Hariprasad Kelam To: Greg Kroah-Hartman , Nishka Dasgupta , Emanuel Bennici , Jeeeun Evans , Arnd Bergmann , Hardik Singh Rathore , Colin Ian King , Payal Kshirsagar , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging/rtl8723bs/core: Remove redundant call to memset Message-ID: <20190616032705.GA13790@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 rtw_zmalloc is doing memset . So there is no need to call memset again. Signed-off-by: Hariprasad Kelam --- drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c index d26d8cf..a8dab1a 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c @@ -2229,7 +2229,6 @@ sint rtw_set_auth(struct adapter *adapter, struct security_priv *psecuritypriv) goto exit; } - memset(psetauthparm, 0, sizeof(struct setauth_parm)); psetauthparm->mode = (unsigned char)psecuritypriv->dot11AuthAlgrthm; pcmd->cmdcode = _SetAuth_CMD_; @@ -2262,7 +2261,6 @@ sint rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, s res = _FAIL; goto exit; } - memset(psetkeyparm, 0, sizeof(struct setkey_parm)); if (psecuritypriv->dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) { psetkeyparm->algorithm = (unsigned char)psecuritypriv->dot118021XGrpPrivacy; -- 2.7.4