staging: rtl8188eu: remove unnecessary variable
authorMartin Kaiser <martin@kaiser.cx>
Wed, 7 Apr 2021 17:05:28 +0000 (19:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Apr 2021 07:26:32 +0000 (09:26 +0200)
We just want to check if rtw_usb_if1_init returns NULL, which means there
was an error.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210407170531.29356-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/os_dep/usb_intf.c

index fba0af3..f173db5 100644 (file)
@@ -450,7 +450,6 @@ 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;
        struct dvobj_priv *dvobj;
 
        /* Initialize dvobj_priv */
@@ -461,9 +460,8 @@ static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device
                goto exit;
        }
 
-       if1 = rtw_usb_if1_init(dvobj, pusb_intf);
-       if (!if1) {
-               pr_debug("rtw_init_primarystruct adapter Failed!\n");
+       if (!rtw_usb_if1_init(dvobj, pusb_intf)) {
+               pr_debug("rtw_usb_if1_init failed\n");
                goto free_dvobj;
        }