mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-08 14:13:53 +00:00
cfg80211: remove BUG_ON usage
These really can't trigger unless somebody messes up the code, but don't make debugging it needlessly complicated, WARN and return instead of BUG_ON(). Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
f55ee08342
commit
2fd0511556
@ -690,7 +690,7 @@ void wiphy_unregister(struct wiphy *wiphy)
|
||||
rtnl_lock();
|
||||
rdev->wiphy.registered = false;
|
||||
|
||||
BUG_ON(!list_empty(&rdev->wdev_list));
|
||||
WARN_ON(!list_empty(&rdev->wdev_list));
|
||||
|
||||
/*
|
||||
* First remove the hardware from everywhere, this makes
|
||||
|
@ -149,7 +149,8 @@ static int cfg80211_conn_do_work(struct wireless_dev *wdev)
|
||||
case CFG80211_CONN_SCAN_AGAIN:
|
||||
return cfg80211_conn_scan(wdev);
|
||||
case CFG80211_CONN_AUTHENTICATE_NEXT:
|
||||
BUG_ON(!rdev->ops->auth);
|
||||
if (WARN_ON(!rdev->ops->auth))
|
||||
return -EOPNOTSUPP;
|
||||
wdev->conn->state = CFG80211_CONN_AUTHENTICATING;
|
||||
return cfg80211_mlme_auth(rdev, wdev->netdev,
|
||||
params->channel, params->auth_type,
|
||||
@ -161,7 +162,8 @@ static int cfg80211_conn_do_work(struct wireless_dev *wdev)
|
||||
case CFG80211_CONN_AUTH_FAILED:
|
||||
return -ENOTCONN;
|
||||
case CFG80211_CONN_ASSOCIATE_NEXT:
|
||||
BUG_ON(!rdev->ops->assoc);
|
||||
if (WARN_ON(!rdev->ops->assoc))
|
||||
return -EOPNOTSUPP;
|
||||
wdev->conn->state = CFG80211_CONN_ASSOCIATING;
|
||||
if (wdev->conn->prev_bssid_valid)
|
||||
req.prev_bssid = wdev->conn->prev_bssid;
|
||||
|
Loading…
Reference in New Issue
Block a user