Staging: rtl8192e: add curly braces to if statement
authorDan Carpenter <error27@gmail.com>
Tue, 10 Aug 2010 06:15:52 +0000 (08:15 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 31 Aug 2010 21:48:08 +0000 (14:48 -0700)
In the original code there was some extra semicolons after the if
statement:
if (!channel_map[ieee->current_network.channel]);
       ^^^
>From the indenting it looked like that should be curly braces instead.

Also I made some white space changes to stop checkpatch.pl from
complaining.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c

index b7ec1ddee7043b4c98d96e9b80b73f5158fed597..f6d81fe643de1bf76979e2c53e761e1627e6365b 100644 (file)
@@ -527,16 +527,16 @@ void ieee80211_softmac_scan_wq(struct work_struct *work)
        do{
                ieee->current_network.channel =
                        (ieee->current_network.channel + 1) % MAX_CHANNEL_NUMBER;
-               if (watchdog++ > MAX_CHANNEL_NUMBER)
-               {
-               //if current channel is not in channel map, set to default channel.
-               #ifdef ENABLE_DOT11D
-                       if (!channel_map[ieee->current_network.channel]);
-               #else
-                       if (!ieee->channel_map[ieee->current_network.channel]);
-               #endif
+               if (watchdog++ > MAX_CHANNEL_NUMBER) {
+                       /* if current channel is not in channel map, set to default channel. */
+#ifdef ENABLE_DOT11D
+                       if (!channel_map[ieee->current_network.channel]) {
+#else
+                       if (!ieee->channel_map[ieee->current_network.channel]) {
+#endif
                                ieee->current_network.channel = 6;
                                goto out; /* no good chans */
+                       }
                }
 #ifdef ENABLE_DOT11D
         }while(!channel_map[ieee->current_network.channel]);