Skip to content

Commit

Permalink
ath6kl: fix WLAN_ENABLE usage in ath6kl_close()
Browse files Browse the repository at this point in the history
If ath6kl_init_hw_stop() failed with an error WLAN_ENABLED would not
be cleared. Found during code review and just a theoretical issue.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
  • Loading branch information
Kalle Valo committed Nov 11, 2011
1 parent 5fe4dff commit 6846934
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/wireless/ath/ath6kl/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,6 @@ static int ath6kl_close(struct net_device *dev)
0, 0, 0, 0, 0, 0, 0, 0, 0))
return -EIO;

clear_bit(WLAN_ENABLED, &vif->flags);
}

ath6kl_cfg80211_scan_complete_event(vif, -ECANCELED);
Expand All @@ -1157,6 +1156,8 @@ static int ath6kl_close(struct net_device *dev)
if (ret)
return ret;

clear_bit(WLAN_ENABLED, &vif->flags);

return 0;
}

Expand Down

0 comments on commit 6846934

Please sign in to comment.