Commit a4adfa83 authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Greg Kroah-Hartman

staging: r8188eu: Remove unnecessary ret variable in rtw_drv_init()

ret is unnecessary as both error paths set the same error code so just
return that directly.
Suggested-by: default avatarFabio M. De Francesco <fmdefrancesco@gmail.com>
Reviewed-by: default avatarFabio M. De Francesco <fmdefrancesco@gmail.com>
Acked-by: default avatarPhillip Potter <phil@philpotter.co.uk>
Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20210813201418.4018631-1-nathan@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b3844703
......@@ -705,22 +705,18 @@ static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device
{
struct adapter *if1 = NULL;
struct dvobj_priv *dvobj;
int ret;
/* step 0. */
process_spec_devid(pdid);
/* Initialize dvobj_priv */
dvobj = usb_dvobj_init(pusb_intf);
if (!dvobj) {
ret = -ENODEV;
if (!dvobj)
goto err;
}
if1 = rtw_usb_if1_init(dvobj, pusb_intf);
if (!if1) {
DBG_88E("rtw_init_primarystruct adapter Failed!\n");
ret = -ENODEV;
goto free_dvobj;
}
......@@ -734,7 +730,7 @@ static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device
free_dvobj:
usb_dvobj_deinit(pusb_intf);
err:
return ret;
return -ENODEV;
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment