[PATCH 2/6] staging: rtl8723bs: Initialize variables at declaration in odm_HWConfig.c

From: Erick Karanja
Date: Thu Apr 10 2025 - 09:12:10 EST


Make the code more concise and readable by integrating the initialization
directly into the variable declaration in cases where the initialization
is simple and doesn't depend on other variables or complex expressions.

Signed-off-by: Erick Karanja <karanja99erick@xxxxxxxxx>
---
drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
index 994b8c578e7a..85cda5c3a5b5 100644
--- a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
+++ b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
@@ -52,9 +52,8 @@ static u8 odm_evm_db_to_percentage(s8 value)
/* */
/* -33dB~0dB to 0%~99% */
/* */
- s8 ret_val;
+ s8 ret_val = value;

- ret_val = value;
ret_val /= 2;

if (ret_val >= 0)
--
2.43.0