[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200727114451.GA1913@kadam>
Date: Mon, 27 Jul 2020 14:44:51 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Dinghao Liu <dinghao.liu@....edu.cn>
Cc: kjlu@....edu, devel@...verdev.osuosl.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, Julia Lawall <julia.lawall@...ia.fr>,
Stefano Brivio <sbrivio@...hat.com>,
Shreeya Patel <shreeya.patel23498@...il.com>,
Larry Finger <Larry.Finger@...inger.net>
Subject: Re: [PATCH] Staging: rtl8188eu: rtw_mlme: Fix uninitialized variable
authmode
On Fri, Jul 24, 2020 at 08:29:55PM +0800, Dinghao Liu wrote:
> The variable authmode will keep uninitialized if neither if
> statements used to initialize this variable are not triggered.
> Then authmode may contain a garbage value and influence the
> execution flow of this function.
>
> Fix this by initializing it to zero.
>
> Signed-off-by: Dinghao Liu <dinghao.liu@....edu.cn>
This matches how rtl8723bs does it.
Fixes: 7b464c9fa5cc ("staging: r8188eu: Add files for new driver - part 4")
Reviewed-by: Dan Carpenter <dan.carpenter@...cle.com>
There is a quirk/bug in GCC where it's initializing stuff to zero
sometimes instead of printing a compile warning so this probably doesn't
change run time very much.
regards,
dan carpenter
Powered by blists - more mailing lists