From: Giacomo Di Clerico Date: Tue, 17 Mar 2026 10:07:23 +0000 (+0100) Subject: staging: rtl8723bs: simplify return checks in validate_recv_data_frame() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efa140029a982c2194f26b3edad44aab4f542d75;p=thirdparty%2Flinux.git 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" Signed-off-by: Giacomo Di Clerico Link: https://patch.msgid.link/20260317100723.72476-1-giacomodiclerico@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c index 1a52d3e1d285..a52884d2129f 100644 --- a/drivers/staging/rtl8723bs/core/rtw_recv.c +++ b/drivers/staging/rtl8723bs/core/rtw_recv.c @@ -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) {