From: Himanshu Jha Date: Mon, 28 Aug 2017 10:45:32 +0000 (+0530) Subject: staging: rtlwifi: remove memset before memcpy X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=30207d7b640cd27a814abbc657c911121160dc10;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtlwifi/base.c b/drivers/staging/rtlwifi/base.c index 9a045c7d020c..b88b0e8edd3d 100644 --- a/drivers/staging/rtlwifi/base.c +++ b/drivers/staging/rtlwifi/base.c @@ -2558,7 +2558,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;