Staging: rtl8192u: Remove else after return
authorKsenija Stanojevic <ksenija.stanojevic@gmail.com>
Fri, 20 Feb 2015 21:54:27 +0000 (22:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Feb 2015 21:24:15 +0000 (13:24 -0800)
This patch simplifies the code by removing else and fixes
the following checkpatch.pl warning: "else is not useful after
break or return".

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/r819xU_phy.c

index dbd3321c6d4a305f6186619cc30f2da1b0ee3f11..84a8a9a78a46a97ae3c7cb2478d142383b968415 100644 (file)
@@ -1365,11 +1365,10 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
                        if ((*stage) == 2) {
                                (*delay) = CurrentCmd->msDelay;
                                return true;
-                       } else {
-                               (*stage)++;
-                               (*step) = 0;
-                               continue;
                        }
+                       (*stage)++;
+                       (*step) = 0;
+                       continue;
                }
 
                switch (CurrentCmd->CmdID) {