From: Vo Thanh Cong <thanhcongvo079@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
anac.amplar@gmail.com, Vo Thanh Cong <thanhcongvo079@gmail.com>
Subject: [PATCH] staging: rtl8723bs: remove unnecessary else after break
Date: Mon, 12 Jan 2026 01:06:35 +0700 [thread overview]
Message-ID: <20260111180635.198615-1-thanhcongvo079@gmail.com> (raw)
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@gmail.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
next reply other threads:[~2026-01-11 18:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-11 18:06 Vo Thanh Cong [this message]
2026-01-12 10:59 ` Greg KH
2026-08-09 16:15 Raushan Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260111180635.198615-1-thanhcongvo079@gmail.com \
--to=thanhcongvo079@gmail.com \
--cc=anac.amplar@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®