Skip to content

Commit

Permalink
mac80211: remove unnecessary BUG_ON()
Browse files Browse the repository at this point in the history
The BUG_ON(!err) can't be triggered in the code path, so remove
it.

Signed-off-by: Zhao, Gang <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
  • Loading branch information
zhao-gang authored and jmberg-intel committed Apr 25, 2014
1 parent 6b59db7 commit 308f7fc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/mac80211/sta_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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;
}
Expand Down

0 comments on commit 308f7fc

Please sign in to comment.