mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
staging: rtl8712: Remove useless variable 'fw_found'
The net device only exists when firmware is loaded successfully. Firmware presence variable is only used through r871xu_dev_remove() and this function already checks for net device existence. Signed-off-by: Thomas Vegas <thomas@grouk.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5947956bdc
commit
22649bb2b6
4 changed files with 3 additions and 9 deletions
|
@ -160,7 +160,6 @@ struct _adapter {
|
||||||
s32 bSurpriseRemoved;
|
s32 bSurpriseRemoved;
|
||||||
u32 IsrContent;
|
u32 IsrContent;
|
||||||
u32 ImrContent;
|
u32 ImrContent;
|
||||||
bool fw_found;
|
|
||||||
u8 EepromAddressSize;
|
u8 EepromAddressSize;
|
||||||
u8 hw_init_completed;
|
u8 hw_init_completed;
|
||||||
struct task_struct *cmdThread;
|
struct task_struct *cmdThread;
|
||||||
|
|
|
@ -50,13 +50,11 @@ static void rtl871x_load_fw_cb(const struct firmware *firmware, void *context)
|
||||||
struct usb_device *udev = padapter->dvobjpriv.pusbdev;
|
struct usb_device *udev = padapter->dvobjpriv.pusbdev;
|
||||||
struct usb_interface *pusb_intf = padapter->pusb_intf;
|
struct usb_interface *pusb_intf = padapter->pusb_intf;
|
||||||
dev_err(&udev->dev, "r8712u: Firmware request failed\n");
|
dev_err(&udev->dev, "r8712u: Firmware request failed\n");
|
||||||
padapter->fw_found = false;
|
|
||||||
usb_put_dev(udev);
|
usb_put_dev(udev);
|
||||||
usb_set_intfdata(pusb_intf, NULL);
|
usb_set_intfdata(pusb_intf, NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
padapter->fw = firmware;
|
padapter->fw = firmware;
|
||||||
padapter->fw_found = true;
|
|
||||||
/* firmware available - start netdev */
|
/* firmware available - start netdev */
|
||||||
register_netdev(padapter->pnetdev);
|
register_netdev(padapter->pnetdev);
|
||||||
}
|
}
|
||||||
|
|
|
@ -345,8 +345,7 @@ u8 r8712_free_drv_sw(struct _adapter *padapter)
|
||||||
r8712_free_mlme_priv(&padapter->mlmepriv);
|
r8712_free_mlme_priv(&padapter->mlmepriv);
|
||||||
r8712_free_io_queue(padapter);
|
r8712_free_io_queue(padapter);
|
||||||
_free_xmit_priv(&padapter->xmitpriv);
|
_free_xmit_priv(&padapter->xmitpriv);
|
||||||
if (padapter->fw_found)
|
_r8712_free_sta_priv(&padapter->stapriv);
|
||||||
_r8712_free_sta_priv(&padapter->stapriv);
|
|
||||||
_r8712_free_recv_priv(&padapter->recvpriv);
|
_r8712_free_recv_priv(&padapter->recvpriv);
|
||||||
mp871xdeinit(padapter);
|
mp871xdeinit(padapter);
|
||||||
if (pnetdev)
|
if (pnetdev)
|
||||||
|
|
|
@ -613,8 +613,7 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf)
|
||||||
struct _adapter *padapter = netdev_priv(pnetdev);
|
struct _adapter *padapter = netdev_priv(pnetdev);
|
||||||
|
|
||||||
usb_set_intfdata(pusb_intf, NULL);
|
usb_set_intfdata(pusb_intf, NULL);
|
||||||
if (padapter->fw_found)
|
release_firmware(padapter->fw);
|
||||||
release_firmware(padapter->fw);
|
|
||||||
/* never exit with a firmware callback pending */
|
/* never exit with a firmware callback pending */
|
||||||
wait_for_completion(&padapter->rtl8712_fw_ready);
|
wait_for_completion(&padapter->rtl8712_fw_ready);
|
||||||
if (drvpriv.drv_registered == true)
|
if (drvpriv.drv_registered == true)
|
||||||
|
@ -623,8 +622,7 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf)
|
||||||
flush_scheduled_work();
|
flush_scheduled_work();
|
||||||
udelay(1);
|
udelay(1);
|
||||||
/* Stop driver mlme relation timer */
|
/* Stop driver mlme relation timer */
|
||||||
if (padapter->fw_found)
|
r8712_stop_drv_timers(padapter);
|
||||||
r8712_stop_drv_timers(padapter);
|
|
||||||
r871x_dev_unload(padapter);
|
r871x_dev_unload(padapter);
|
||||||
r8712_free_drv_sw(padapter);
|
r8712_free_drv_sw(padapter);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue