summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8188eu/os_dep/usb_intf.c
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2015-07-16 16:58:10 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-16 10:18:09 -0700
commitce806322730a2b29fd15c7873c09335a49b7a941 (patch)
treedcd39f86b7aaafaf5d3638b2e09b25c650f8e2b6 /drivers/staging/rtl8188eu/os_dep/usb_intf.c
parent47ccb34ac72c0dbbb68f6a07ce63e9f0d21510ea (diff)
staging: rtl8188eu: remove unneeded variable
The default value of status was _FAIL, it was only changed if kzalloc succeeds and the check for status is immediately following kzalloc. We can have the failure code in the else part as the failure code will be executed only if kzalloc fails. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu/os_dep/usb_intf.c')
-rw-r--r--drivers/staging/rtl8188eu/os_dep/usb_intf.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
index f68875bd9511..2d75c77c8cdb 100644
--- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
@@ -55,7 +55,6 @@ MODULE_DEVICE_TABLE(usb, rtw_usb_id_tbl);
static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
{
int i;
- int status = _FAIL;
struct dvobj_priv *pdvobjpriv;
struct usb_host_config *phost_conf;
struct usb_config_descriptor *pconf_desc;
@@ -117,10 +116,7 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
if (pdvobjpriv->usb_vendor_req_buf) {
usb_get_dev(pusbd);
- status = _SUCCESS;
- }
-
- if (status != _SUCCESS) {
+ } else {
usb_set_intfdata(usb_intf, NULL);
kfree(pdvobjpriv);
pdvobjpriv = NULL;