Skip to contentSkip to conversation

staging: rtl8723bs: simplify return checks in validate_recv_data_frame()

PATCH New Giacomo Di Clerico 1 participant 1 message Mar 17 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8723bs: simplify return checks in validate_recv_data_frame()

Combine the return value checks for _FAIL and RTW_RX_HANDLED into a single logical OR statement and remove unnecessary braces. This improves code readability and resolves the following checkpatch.pl warning:
"WARNING: braces {} are not necessary for any arm of this statement"

---
 drivers/staging/rtl8723bs/core/rtw_recv.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/staging/rtl8723bs/core/rtw_recv.c +1 -4
index 1a52d3e1d285..a52884d2129f 100644
@@ -1339,11 +1339,8 @@ static signed int validate_recv_data_frame(struct adapter *adapter, union recv_f
 
 	}
 
-	if (ret == _FAIL) {
+	if (ret == _FAIL || ret == RTW_RX_HANDLED)
 		goto exit;
-	} else if (ret == RTW_RX_HANDLED) {
-		goto exit;
-	}
 
 
 	if (!psta) {
Signature · 1 line
2.53.0