Skip to content

Commit f1be210

Browse files
arndbgregkh
authored andcommitted
rtlwifi: fix uninitialized rtlhal->last_suspend_sec time
commit 3f2a162fab15aee243178b5308bb5d1206fc4043 upstream. 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. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82839 Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 3c260c6 commit f1be210

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • drivers/net/wireless/realtek/rtlwifi/rtl8821ae

drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,6 +1377,7 @@ static void _rtl8821ae_get_wakeup_reason(struct ieee80211_hw *hw)
13771377

13781378
ppsc->wakeup_reason = 0;
13791379

1380+
do_gettimeofday(&ts);
13801381
rtlhal->last_suspend_sec = ts.tv_sec;
13811382

13821383
switch (fw_reason) {

0 commit comments

Comments
 (0)