summaryrefslogtreecommitdiffstats
path: root/net/mac80211/sta_info.c
diff options
context:
space:
mode:
authorZhao, Gang2014-04-21 06:53:00 +0200
committerJohannes Berg2014-04-25 17:31:00 +0200
commit308f7fcfdba47f24cd70cba978fd10fb4584e61c (patch)
tree34fcd72b534a31032033308ac8c4da1ecf5c999f /net/mac80211/sta_info.c
parentmac80211: return bool instead of numbers in yes/no function (diff)
downloadkernel-qcow2-linux-308f7fcfdba47f24cd70cba978fd10fb4584e61c.tar.gz
kernel-qcow2-linux-308f7fcfdba47f24cd70cba978fd10fb4584e61c.tar.xz
kernel-qcow2-linux-308f7fcfdba47f24cd70cba978fd10fb4584e61c.zip
mac80211: remove unnecessary BUG_ON()
The BUG_ON(!err) can't be triggered in the code path, so remove it. Signed-off-by: Zhao, Gang <gamerh2o@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r--net/mac80211/sta_info.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 137a192e64bc..c34a5f97abc7 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -552,7 +552,7 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
int sta_info_insert_rcu(struct sta_info *sta) __acquires(RCU)
{
struct ieee80211_local *local = sta->local;
- int err = 0;
+ int err;
might_sleep();
@@ -570,7 +570,6 @@ int sta_info_insert_rcu(struct sta_info *sta) __acquires(RCU)
return 0;
out_free:
- BUG_ON(!err);
sta_info_free(local, sta);
return err;
}