[PATCH v1] staging: rtl8723bs: remove empty if branch in halbtc8723b1ant_RunSwCoexistMechanism
From: Nithishvelan M
Date: Sat Oct 17 2026 - 23:33:17 EST
In halbtc8723b1ant_RunSwCoexistMechanism(), the if branch checking
halbtc8723b1ant_IsCommonAction() is empty, leaving the assignment to
preAlgorithm in the else branch. This triggers a checkpatch warning
about unnecessary braces for single-statement blocks.
Invert the condition and eliminate the empty if branch and braces,
simplifying the logic and resolving the checkpatch warning.
Signed-off-by: Nithishvelan M <mnithishvelan@xxxxxxxxx>
---
drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c b/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c
index 0613beaa37..dfe921033f 100644
--- a/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c
+++ b/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c
@@ -1903,11 +1903,8 @@ static void halbtc8723b1ant_RunSwCoexistMechanism(struct btc_coexist *pBtCoexist
algorithm = halbtc8723b1ant_ActionAlgorithm(pBtCoexist);
pCoexDm->curAlgorithm = algorithm;
- if (halbtc8723b1ant_IsCommonAction(pBtCoexist)) {
-
- } else {
+ if (!halbtc8723b1ant_IsCommonAction(pBtCoexist))
pCoexDm->preAlgorithm = pCoexDm->curAlgorithm;
- }
}
static void halbtc8723b1ant_RunCoexistMechanism(struct btc_coexist *pBtCoexist)
--
2.53.0