Skip to content

Commit

Permalink
rtlwifi: fix uninitialized rtlhal->last_suspend_sec time
Browse files Browse the repository at this point in the history
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: [email protected]
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82839
Signed-off-by: Arnd Bergmann <[email protected]>
Acked-by: Larry Finger <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
  • Loading branch information
arndb authored and Kalle Valo committed Nov 8, 2017
1 parent c1b5864 commit 3f2a162
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 3f2a162

Please sign in to comment.