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

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=82839


Signed-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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1373,6 +1373,7 @@ static void _rtl8821ae_get_wakeup_reason(struct ieee80211_hw *hw)

	ppsc->wakeup_reason = 0;

	do_gettimeofday(&ts);
	rtlhal->last_suspend_sec = ts.tv_sec;

	switch (fw_reason) {