summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2012-05-15 13:20:25 -0700
committerOm Prakash Singh <omp@nvidia.com>2012-06-15 14:15:18 +0530
commit80cea895e912ac4b41b509137a00f3bae69a3f8c (patch)
tree35a0d46db559cebb46713d08cef57d783f93d554 /drivers/net
parent99d59b5c10362bc439a2ec5dbee14961c248c18b (diff)
net: wireless: bcmdhd: Fix WARN_ON(!res->pub.channel)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/bcmdhd/wl_cfg80211.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/bcmdhd/wl_cfg80211.c b/drivers/net/wireless/bcmdhd/wl_cfg80211.c
index 98e498d785cd..2aea33634947 100644
--- a/drivers/net/wireless/bcmdhd/wl_cfg80211.c
+++ b/drivers/net/wireless/bcmdhd/wl_cfg80211.c
@@ -4560,6 +4560,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,