OSDN Git Service

staging: rtl8188eu: fix usage of uninit scalar in rtw_drv_init()
authorChristian Engelmayer <cengelma@gmx.at>
Sat, 17 May 2014 10:38:57 +0000 (12:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 May 2014 16:46:38 +0000 (01:46 +0900)
commit9eb6f16dfe958e0de659f671809e9f9e31e443ae
treed5588e070a764e265b21347e9f47db88b3d29cb8
parente0c49319774f06fa7d2bf4731640c2ec1c6847be
staging: rtl8188eu: fix usage of uninit scalar in rtw_drv_init()

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>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/os_dep/usb_intf.c