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: <20260111180635.198615-1-thanhcongvo079@gmail.com>
Date: Mon, 12 Jan 2026 01:06:35 +0700
From: Vo Thanh Cong <thanhcongvo079@...il.com>
To: gregkh@...uxfoundation.org
Cc: linux-staging@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	anac.amplar@...il.com,
	Vo Thanh Cong <thanhcongvo079@...il.com>
Subject: [PATCH] staging: rtl8723bs: remove unnecessary else after break

This patch fixes the checkpatch.pl warning:
"WARNING: else is not generally useful after a break or return"

In sdio_ops_linux.c, the else blocks after break statements are
redundant. Removing them reduces indentation level and improves
code readability.

Signed-off-by: Vo Thanh Cong <thanhcongvo079@...il.com>
---
 .../staging/rtl8723bs/os_dep/sdio_ops_linux.c | 30 +++++++++----------
 1 file changed, 14 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c b/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c
index 5dc00e9117ae..87444d36c502 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c
@@ -219,14 +219,14 @@ u32 sd_read32(struct intf_hdl *pintfhdl, u32 addr, s32 *err)
 			if (*err == 0) {
 				rtw_reset_continual_io_error(psdiodev);
 				break;
-			} else {
-				if ((-ESHUTDOWN == *err) || (-ENODEV == *err))
-					padapter->bSurpriseRemoved = true;
-
-				if (rtw_inc_and_chk_continual_io_error(psdiodev) == true) {
-					padapter->bSurpriseRemoved = true;
-					break;
-				}
+			}
+
+			if ((-ESHUTDOWN == *err) || (-ENODEV == *err))
+				padapter->bSurpriseRemoved = true;
+
+			if (rtw_inc_and_chk_continual_io_error(psdiodev) == true) {
+				padapter->bSurpriseRemoved = true;
+				break;
 			}
 		}
 	}
@@ -295,14 +295,12 @@ void sd_write32(struct intf_hdl *pintfhdl, u32 addr, u32 v, s32 *err)
 			if (*err == 0) {
 				rtw_reset_continual_io_error(psdiodev);
 				break;
-			} else {
-				if ((-ESHUTDOWN == *err) || (-ENODEV == *err))
-					padapter->bSurpriseRemoved = true;
-
-				if (rtw_inc_and_chk_continual_io_error(psdiodev) == true) {
-					padapter->bSurpriseRemoved = true;
-					break;
-				}
+			}
+			if ((-ESHUTDOWN == *err) || (-ENODEV == *err))
+				padapter->bSurpriseRemoved = true;
+			if (rtw_inc_and_chk_continual_io_error(psdiodev) == true) {
+				padapter->bSurpriseRemoved = true;
+				break;
 			}
 		}
 	}
-- 
2.52.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ