lkml.org 
[lkml]   [2014]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] staging: rtl8188eu: fix usage of uninit scalar in rtw_drv_init()
On Sat, May 17, 2014 at 12:38:57PM +0200, Christian Engelmayer wrote:
> Function rtw_drv_init() is written in a way that assumes 'status' != _SUCCESS
> as long as not explicitly set. Thus initialize 'status' to FAIL, in order to
> prevent undefined behaviour if going through the exit paths. Detected by
> Coverity - CID 1077832.
>
> Signed-off-by: Christian Engelmayer <cengelma@gmx.at>

This is a bugfix and we like to merge bugfixes without asking redo
things, so don't redo. But really the better fix is to get rid of the
status variable completely. Just return directly on the success path.

If we were to do that, then both patches would be merged together and
called: [patch] Staging: rtl8188eu: fix error handling in rtw_drv_init()

But this patch is also acceptable as-is. Thanks for fixing the bug. :)

regards,
dan carpenter



\
 
 \ /
  Last update: 2014-05-17 17:21    [W:0.072 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site