From: Dmitry Shmidt Date: Tue, 15 May 2012 20:20:25 +0000 (-0700) Subject: net: wireless: bcmdhd: Fix WARN_ON(!res->pub.channel) X-Git-Tag: firefly_0821_release~7613^2~100 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b9fd9e2371b35ba24a4928e7126b2ce4efe4edf2;p=firefly-linux-kernel-4.4.55.git net: wireless: bcmdhd: Fix WARN_ON(!res->pub.channel) Signed-off-by: Dmitry Shmidt --- diff --git a/drivers/net/wireless/bcmdhd/wl_cfg80211.c b/drivers/net/wireless/bcmdhd/wl_cfg80211.c index 839f907d5798..79f48ccf8bac 100644 --- a/drivers/net/wireless/bcmdhd/wl_cfg80211.c +++ b/drivers/net/wireless/bcmdhd/wl_cfg80211.c @@ -4557,6 +4557,11 @@ static s32 wl_inform_single_bss(struct wl_priv *wl, struct wl_bss_info *bi) freq = ieee80211_channel_to_frequency(notif_bss_info->channel, band->band); #endif channel = ieee80211_get_channel(wiphy, freq); + if (!channel) { + WL_ERR(("No valid channel")); + kfree(notif_bss_info); + return -EINVAL; + } WL_DBG(("SSID : \"%s\", rssi %d, channel %d, capability : 0x04%x, bssid %pM" "mgmt_type %d frame_len %d\n", bi->SSID,