[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1503917132-5249-1-git-send-email-himanshujha199640@gmail.com>
Date: Mon, 28 Aug 2017 16:15:32 +0530
From: Himanshu Jha <himanshujha199640@...il.com>
To: gregkh@...uxfoundation.org
Cc: kvalo@...eaurora.org, Larry.Finger@...inger.net,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Himanshu Jha <himanshujha199640@...il.com>
Subject: [PATCH] staging: rtlwifi: remove memset before memcpy
calling memcpy immediately after memset with the same region of memory
makes memset redundant.
Signed-off-by: Himanshu Jha <himanshujha199640@...il.com>
---
drivers/staging/rtlwifi/base.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/rtlwifi/base.c b/drivers/staging/rtlwifi/base.c
index b81f0a9..63ce708 100644
--- a/drivers/staging/rtlwifi/base.c
+++ b/drivers/staging/rtlwifi/base.c
@@ -2554,7 +2554,6 @@ bool rtl_check_beacon_key(struct ieee80211_hw *hw, void *data, unsigned int len)
if (!cur_bcn_key->valid) {
/* update cur_beacon_keys */
- memset(cur_bcn_key, 0, sizeof(bcn_key));
memcpy(cur_bcn_key, &bcn_key, sizeof(bcn_key));
cur_bcn_key->valid = true;
--
2.7.4
Powered by blists - more mailing lists