mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-02 11:13:02 +09:00
rtlwifi: fix uninitialized rtlhal->last_suspend_sec time
commit 3f2a162fab 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9f724960c5
commit
404dcc55b0
@@ -1372,6 +1372,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) {
|
||||
|
||||
Reference in New Issue
Block a user