OSDN Git Service

staging: rtl8192u: simplify conditional
authorLuis de Bethencourt <luisbg@osg.samsung.com>
Sat, 17 Oct 2015 10:39:25 +0000 (11:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Oct 2015 01:33:17 +0000 (18:33 -0700)
The code can be much cleaner and readable by simplifying the conditional
statement.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c

index fcbd59f..c57fb22 100644 (file)
@@ -466,13 +466,9 @@ 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;
 
-
                msleep_interruptible_rsl(IEEE80211_SOFTMAC_SCAN_TIME);
 
        }