diff options
author | Johannes Berg <johannes.berg@intel.com> | 2014-04-29 17:55:26 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-04-29 17:59:27 +0200 |
commit | 8c5bb1fad0bb9c29f7d817c1e2fdb052b76f04e9 (patch) | |
tree | 367302bae08e527e1ede890d8674dc9077b83e7e /net/mac80211/mesh_pathtbl.c | |
parent | cfg80211: remove BUG_ON usage (diff) | |
download | linux-8c5bb1fad0bb9c29f7d817c1e2fdb052b76f04e9.tar.xz linux-8c5bb1fad0bb9c29f7d817c1e2fdb052b76f04e9.zip |
mac80211: remove BUG_ON usage
These BUG_ON statements should never trigger, but in the unlikely
event that somebody does manage don't stop everything but simply
exit the code path with an error.
Leave the one BUG_ON where changing it would result in a NULL
pointer dereference.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mesh_pathtbl.c')
-rw-r--r-- | net/mac80211/mesh_pathtbl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index 7d050ed6fe5a..cf032a8db9d7 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c @@ -287,8 +287,10 @@ static void mesh_path_move_to_queue(struct mesh_path *gate_mpath, struct sk_buff_head failq; unsigned long flags; - BUG_ON(gate_mpath == from_mpath); - BUG_ON(!gate_mpath->next_hop); + if (WARN_ON(gate_mpath == from_mpath)) + return; + if (WARN_ON(!gate_mpath->next_hop)) + return; __skb_queue_head_init(&failq); |