Thread (39 messages) 39 messages, 5 authors, 2012-09-05

Re: [RFC 18/20] mac80211: allow drv_add_chanctx to fail

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2012-07-27 11:42:42

On Fri, 2012-07-27 at 13:42 +0200, Michal Kazior wrote:
On 27/07/12 13:16, Johannes Berg wrote:
quoted
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -237,7 +237,10 @@ ieee80211_new_chanctx(struct ieee80211_local *local,

  	list_add(&ctx->list, &local->chanctx_list);

-	drv_add_chanctx(local, ctx);
+	if (drv_add_chanctx(local, ctx)) {
+		kfree(ctx);
We should also do a list_del() here.
Good catch. Or just move the list_add() later?

johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help