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>
This commit is contained in:
Johannes Berg 2014-04-29 17:55:26 +02:00
parent 2fd0511556
commit 8c5bb1fad0
3 changed files with 9 additions and 6 deletions

View file

@ -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);