lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190227033322.127177-1-maowenan@huawei.com>
Date:   Wed, 27 Feb 2019 11:33:22 +0800
From:   Mao Wenan <maowenan@...wei.com>
To:     <Larry.Finger@...inger.net>, <florian.c.schilhabel@...glemail.com>,
        <straube.linux@...il.com>, <kernel-janitors@...r.kernel.org>,
        <devel@...verdev.osuosl.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] staging: rtl8712: assign initial value to a static variable in r8712_efuse_pg_packet_write()

repeat_times is a static variable, but each time when it enters
r8712_efuse_pg_packet_write(), it is set to zero,
this value is not consistent with last calling, so next behavior
is not our expect.

Signed-off-by: Mao Wenan <maowenan@...wei.com>
---
 drivers/staging/rtl8712/rtl8712_efuse.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_efuse.c b/drivers/staging/rtl8712/rtl8712_efuse.c
index 8bc45ffd3029..3e8421255170 100644
--- a/drivers/staging/rtl8712/rtl8712_efuse.c
+++ b/drivers/staging/rtl8712/rtl8712_efuse.c
@@ -358,7 +358,7 @@ u8 r8712_efuse_pg_packet_write(struct _adapter *padapter, const u8 offset,
 	u8 pg_header = 0;
 	u16 efuse_addr = 0, curr_size = 0;
 	u8 efuse_data, target_word_cnts = 0;
-	static int repeat_times;
+	static int repeat_times = 0;
 	int sub_repeat;
 	u8 bResult = true;
 
@@ -368,7 +368,6 @@ u8 r8712_efuse_pg_packet_write(struct _adapter *padapter, const u8 offset,
 		return false;
 	pg_header = MAKE_EFUSE_HEADER(offset, word_en);
 	target_word_cnts = calculate_word_cnts(word_en);
-	repeat_times = 0;
 	efuse_addr = 0;
 	while (efuse_addr < efuse_available_max_size) {
 		curr_size = r8712_efuse_get_current_size(padapter);
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ