From e91eb2ff1f713837caebbb86a06974cd4b3e8e46 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 10 Dec 2010 15:41:18 +0300 Subject: [PATCH] Staging: rtl8192u: add missing curly braces The if condition was ignored in the original code and we just used the default channel. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index 12858880f95f..20f8c347cae4 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c @@ -509,9 +509,10 @@ void ieee80211_softmac_scan_wq(struct work_struct *work) if (watchdog++ > MAX_CHANNEL_NUMBER) { //if current channel is not in channel map, set to default channel. - if (!channel_map[ieee->current_network.channel]); + if (!channel_map[ieee->current_network.channel]) { ieee->current_network.channel = 6; goto out; /* no good chans */ + } } }while(!channel_map[ieee->current_network.channel]); if (ieee->scanning == 0 ) -- 2.20.1