lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210914143107.18436-1-srivathsa729.8@gmail.com>
Date:   Tue, 14 Sep 2021 20:01:06 +0530
From:   Srivathsa Dara <srivathsa729.8@...il.com>
To:     jerome.pouiller@...abs.com, gregkh@...uxfoundation.org
Cc:     linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Srivathsa Dara <srivathsa729.8@...il.com>
Subject: [PATCH] staging: wfx: sta: Fix 'else' coding style warning

Fix 'else is not generally useful after a break or return' checkpatch
warning

Signed-off-by: Srivathsa Dara <srivathsa729.8@...il.com>
---
 drivers/staging/wfx/sta.c | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
index aceb18a1f54b..23c0425e3929 100644
--- a/drivers/staging/wfx/sta.c
+++ b/drivers/staging/wfx/sta.c
@@ -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;
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ