summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8188eu
diff options
context:
space:
mode:
authorChristian Engelmayer <cengelma@gmx.at>2014-05-17 12:38:57 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-24 01:46:38 +0900
commit9eb6f16dfe958e0de659f671809e9f9e31e443ae (patch)
treed5588e070a764e265b21347e9f47db88b3d29cb8 /drivers/staging/rtl8188eu
parente0c49319774f06fa7d2bf4731640c2ec1c6847be (diff)
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>
Diffstat (limited to 'drivers/staging/rtl8188eu')
-rw-r--r--drivers/staging/rtl8188eu/os_dep/usb_intf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
index e8ccb576b4b5..86f0ab9ef727 100644
--- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
@@ -686,7 +686,7 @@ static void rtw_usb_if1_deinit(struct adapter *if1)
static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device_id *pdid)
{
struct adapter *if1 = NULL;
- int status;
+ int status = _FAIL;
struct dvobj_priv *dvobj;
RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("+rtw_drv_init\n"));