Search Linux Wireless

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27/07/12 13:16, Johannes Berg wrote:
--- 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.


+		return NULL;
+	}

  	return ctx;
  }


-- Pozdrawiam / Best regards, Michal Kazior.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux