diff mbox

[05/12] mac80211: remove unnecessary BUG_ON()

Message ID fd686aea6dc877a9d6ecbfabba68b4e1e8b645d0.1398055854.git.gamerh2o@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Gang ZHAO April 21, 2014, 4:53 a.m. UTC
The BUG_ON(!err) can't be triggered in the code path, so remove
it.

Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
---
 net/mac80211/sta_info.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Johannes Berg April 25, 2014, 3:31 p.m. UTC | #1
On Mon, 2014-04-21 at 12:53 +0800, Zhao, Gang wrote:
> The BUG_ON(!err) can't be triggered in the code path, so remove
> it.

Applied.

Btw, it was a bit confusing that you sent your older patches in this
patchset again, please avoid that or at least tell me you did that.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Gang ZHAO April 26, 2014, 1:44 a.m. UTC | #2
On Fri, 2014-04-25 at 17:31:45 +0200, Johannes Berg wrote:
> On Mon, 2014-04-21 at 12:53 +0800, Zhao, Gang wrote:
>> The BUG_ON(!err) can't be triggered in the code path, so remove
>> it.
>
> Applied.
>
> Btw, it was a bit confusing that you sent your older patches in this
> patchset again, please avoid that or at least tell me you did that.

Sure. I thought previous sending failed due to network problem, but
it succeeded. Will check carefully.

> johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 137a192..c34a5f9 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;
 }