Skip to content

Commit

Permalink
virt_wifi: remove set but not used variable 'w_priv'
Browse files Browse the repository at this point in the history
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/wireless/virt_wifi.c: In function 'virt_wifi_net_device_stop':
drivers/net/wireless/virt_wifi.c:432:31: warning:
 variable 'w_priv' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
YueHaibing authored and Johannes Berg committed Jan 19, 2019
1 parent 0c4335d commit e073f7c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/wireless/virt_wifi.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,13 +424,11 @@ static int virt_wifi_net_device_open(struct net_device *dev)
static int virt_wifi_net_device_stop(struct net_device *dev)
{
struct virt_wifi_netdev_priv *n_priv = netdev_priv(dev);
struct virt_wifi_wiphy_priv *w_priv;

n_priv->is_up = false;

if (!dev->ieee80211_ptr)
return 0;
w_priv = wiphy_priv(dev->ieee80211_ptr->wiphy);

virt_wifi_cancel_scan(dev->ieee80211_ptr->wiphy);
virt_wifi_cancel_connect(dev);
Expand Down

0 comments on commit e073f7c

Please sign in to comment.