The code can be much cleaner and readable by simplifying the conditional statement. Only need to check if (ieee->state > IEEE80211_LINKED) and not >= because (ieee->state == IEEE80211_LINKED) is already checked a few lines above. Signed-off-by: Luis de Bethencourt <luisbg@xxxxxxxxxxxxxxx> --- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index c443e2e..1c2d1a4 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c @@ -466,10 +466,7 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee) /* this prevent excessive time wait when we * need to wait for a syncro scan to end.. */ - if(ieee->state < IEEE80211_LINKED) - ; - else - if (ieee->sync_scan_hurryup) + if(!ieee->state > IEEE80211_LINKED && ieee->sync_scan_hurryup) goto out; -- 2.5.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel