rtlwifi: fix uninitialized rtlhal->last_suspend_sec time
authorArnd Bergmann <arnd@arndb.de>
Mon, 6 Nov 2017 13:55:35 +0000 (14:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Nov 2017 08:40:46 +0000 (08:40 +0000)
commit404dcc55b001e2d56d75fa0ea65635963f16fe68
tree6cf471462d74254aabdf51c6f3e4f79a6a3ab27b
parent9f724960c581097e6a84a2f4b9c77a9f17a372cc
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>
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c