Commit 3f2a162f authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Kalle Valo

rtlwifi: fix uninitialized rtlhal->last_suspend_sec time

We set rtlhal->last_suspend_sec to an uninitialized stack variable,
but unfortunately gcc never warned about this, I only found it
while working on another patch. I opened a gcc bug for this.

Presumably the value of rtlhal->last_suspend_sec is not all that
important, but it does get used, so we probably want the
patch backported to stable kernels.

Cc: stable@vger.kernel.org
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82839Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent c1b58640
...@@ -1373,6 +1373,7 @@ static void _rtl8821ae_get_wakeup_reason(struct ieee80211_hw *hw) ...@@ -1373,6 +1373,7 @@ static void _rtl8821ae_get_wakeup_reason(struct ieee80211_hw *hw)
ppsc->wakeup_reason = 0; ppsc->wakeup_reason = 0;
do_gettimeofday(&ts);
rtlhal->last_suspend_sec = ts.tv_sec; rtlhal->last_suspend_sec = ts.tv_sec;
switch (fw_reason) { switch (fw_reason) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment