summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaowen Bai <baihaowen@meizu.com>2022-04-21 17:20:43 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-22 16:41:57 +0200
commit2c61fd036ac51e7ca11ab2fb6252605e8fc9bd23 (patch)
treef261bcf835ea006d7049553f97a0dc58249b9f97
parentcb65037baa62f90cfc0b14babdff0b71ceedbbbd (diff)
downloadcachepc-linux-2c61fd036ac51e7ca11ab2fb6252605e8fc9bd23.tar.gz
cachepc-linux-2c61fd036ac51e7ca11ab2fb6252605e8fc9bd23.zip
staging: r8188eu: Drop redundant memset
The region set by the call to memset is immediately overwritten by the subsequent call to memcpy. So we drop redundant memset. Signed-off-by: Haowen Bai <baihaowen@meizu.com> Link: https://lore.kernel.org/r/1650532843-28132-1-git-send-email-baihaowen@meizu.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/r8188eu/os_dep/mlme_linux.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/staging/r8188eu/os_dep/mlme_linux.c b/drivers/staging/r8188eu/os_dep/mlme_linux.c
index 72ad9700130e..899d8e9c3834 100644
--- a/drivers/staging/r8188eu/os_dep/mlme_linux.c
+++ b/drivers/staging/r8188eu/os_dep/mlme_linux.c
@@ -66,7 +66,6 @@ void rtw_reset_securitypriv(struct adapter *adapter)
/* We have to backup the PMK information for WiFi PMK Caching test item. */
/* Backup the btkip_countermeasure information. */
/* When the countermeasure is trigger, the driver have to disconnect with AP for 60 seconds. */
- memset(&backup_pmkid[0], 0x00, sizeof(struct rt_pmkid_list) * NUM_PMKID_CACHE);
memcpy(&backup_pmkid[0], &adapter->securitypriv.PMKIDList[0], sizeof(struct rt_pmkid_list) * NUM_PMKID_CACHE);
backup_index = adapter->securitypriv.PMKIDIndex;
backup_counter = adapter->securitypriv.btkip_countermeasure;