Staging: rtl8188eu: os_dep: Remove NULL test before rtw_free_netdev
authorBhumika Goyal <bhumirks@gmail.com>
Sun, 14 Feb 2016 15:24:03 +0000 (20:54 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Feb 2016 00:44:06 +0000 (16:44 -0800)
The function rtw_free_netdev test whether its argument is NULL and
return immediately. So NULL test before this function is not needed.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/os_dep/usb_intf.c

index 01d50f7c1667ec8b809fe16cc91cee0da0c4073a..6a68f175931283a4c9b169470a6f2731bf287c36 100644 (file)
@@ -474,8 +474,7 @@ static void rtw_usb_if1_deinit(struct adapter *if1)
        pr_debug("+r871xu_dev_remove, hw_init_completed=%d\n",
                if1->hw_init_completed);
        rtw_free_drv_sw(if1);
-       if (pnetdev)
-               rtw_free_netdev(pnetdev);
+       rtw_free_netdev(pnetdev);
 }
 
 static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device_id *pdid)