From: Dan Carpenter Date: Fri, 10 Dec 2010 12:41:18 +0000 (+0300) Subject: Staging: rtl8192u: add missing curly braces X-Git-Tag: MMI-PSA29.97-13-9~21393^2~43 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e91eb2ff1f713837caebbb86a06974cd4b3e8e46;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 --- 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 )