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>
This commit is contained in:
		
					parent
					
						
							
								6b59db7d4c
							
						
					
				
			
			
				commit
				
					
						308f7fcfdb
					
				
			
		
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
					@ -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)
 | 
					int sta_info_insert_rcu(struct sta_info *sta) __acquires(RCU)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct ieee80211_local *local = sta->local;
 | 
						struct ieee80211_local *local = sta->local;
 | 
				
			||||||
	int err = 0;
 | 
						int err;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	might_sleep();
 | 
						might_sleep();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -570,7 +570,6 @@ int sta_info_insert_rcu(struct sta_info *sta) __acquires(RCU)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
 out_free:
 | 
					 out_free:
 | 
				
			||||||
	BUG_ON(!err);
 | 
					 | 
				
			||||||
	sta_info_free(local, sta);
 | 
						sta_info_free(local, sta);
 | 
				
			||||||
	return err;
 | 
						return err;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue