staging: wfx: sta: Fix 'else' coding style warning
authorSrivathsa Dara <srivathsa729.8@gmail.com>
Tue, 14 Sep 2021 14:31:06 +0000 (20:01 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Sep 2021 14:23:42 +0000 (16:23 +0200)
Fix 'else is not generally useful after a break or return' checkpatch
warning

Signed-off-by: Srivathsa Dara <srivathsa729.8@gmail.com>
Link: https://lore.kernel.org/r/20210914143107.18436-1-srivathsa729.8@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/sta.c

index aceb18a..23c0425 100644 (file)
@@ -169,19 +169,18 @@ static int wfx_get_ps_timeout(struct wfx_vif *wvif, bool *enable_ps)
                        if (wvif->vif->bss_conf.assoc && wvif->vif->bss_conf.ps)
                                dev_info(wvif->wdev->dev, "ignoring requested PS mode");
                        return -1;
-               } else {
-                       /* It is necessary to enable PS if channels
-                        * are different.
-                        */
-                       if (enable_ps)
-                               *enable_ps = true;
-                       if (wvif->wdev->force_ps_timeout > -1)
-                               return wvif->wdev->force_ps_timeout;
-                       else if (wfx_api_older_than(wvif->wdev, 3, 2))
-                               return 0;
-                       else
-                               return 30;
                }
+               /* It is necessary to enable PS if channels
+                * are different.
+                */
+               if (enable_ps)
+                       *enable_ps = true;
+               if (wvif->wdev->force_ps_timeout > -1)
+                       return wvif->wdev->force_ps_timeout;
+               else if (wfx_api_older_than(wvif->wdev, 3, 2))
+                       return 0;
+               else
+                       return 30;
        }
        if (enable_ps)
                *enable_ps = wvif->vif->bss_conf.ps;