diff options
author | Ajay Singh | 2018-12-02 19:02:16 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2018-12-05 09:48:45 +0100 |
commit | 440592df865f0ef6859882431f65a06c124080db (patch) | |
tree | 74474bec98359b66e812603d031e0fbe95551197 /drivers/staging/wilc1000 | |
parent | staging: greybus: Added space between string concatenated (diff) | |
download | kernel-qcow2-linux-440592df865f0ef6859882431f65a06c124080db.tar.gz kernel-qcow2-linux-440592df865f0ef6859882431f65a06c124080db.tar.xz kernel-qcow2-linux-440592df865f0ef6859882431f65a06c124080db.zip |
staging: wilc1000: remove unnecessary checks in wilc_mac_close()
Remove unnecessary 'if' check in wilc_mac_close() as those conditions
will not happen.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000')
-rw-r--r-- | drivers/staging/wilc1000/linux_wlan.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 66fb98807404..c92ee79ab2e4 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -896,31 +896,11 @@ netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev) static int wilc_mac_close(struct net_device *ndev) { - struct wilc_priv *priv; struct wilc_vif *vif = netdev_priv(ndev); - struct host_if_drv *hif_drv; - struct wilc *wl; - - if (!vif || !vif->ndev || !vif->ndev->ieee80211_ptr || - !vif->ndev->ieee80211_ptr->wiphy) - return 0; - - priv = wiphy_priv(vif->ndev->ieee80211_ptr->wiphy); - wl = vif->wilc; - - if (!priv) - return 0; - - hif_drv = (struct host_if_drv *)priv->hif_drv; + struct wilc *wl = vif->wilc; netdev_dbg(ndev, "Mac close\n"); - if (!wl) - return 0; - - if (!hif_drv) - return 0; - if (wl->open_ifcs > 0) wl->open_ifcs--; else |