From: Prithvi Tambewagh Date: Thu, 9 Apr 2026 13:50:24 +0000 (+0530) Subject: staging: rtl8723bs: simplify boolean return in IsFrameTypeCtrl() X-Git-Tag: v7.2-rc1~66^2~157 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=5e49201454f366f81785518a7050de9128ebb9f1;p=thirdparty%2Flinux.git staging: rtl8723bs: simplify boolean return in IsFrameTypeCtrl() Replace the simple if-else statement which checked value of GetFrameType(pframe), if equal to WIFI_CTRL_TYPE, function IsFrameTypeCtrl() returned true else false, with a single return statement returning true only if GetFrameType(pframe) == WIFI_CTRL_TYPE otherwise returns false. Signed-off-by: Prithvi Tambewagh Reviewed-by: Luka Gejak Link: https://patch.msgid.link/20260409135026.137904-4-activprithvi@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723bs/include/wifi.h b/drivers/staging/rtl8723bs/include/wifi.h index 230b2c4ffd3bf..2876f15f13d1d 100644 --- a/drivers/staging/rtl8723bs/include/wifi.h +++ b/drivers/staging/rtl8723bs/include/wifi.h @@ -275,10 +275,7 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe) static inline int IsFrameTypeCtrl(unsigned char *pframe) { - if (WIFI_CTRL_TYPE == GetFrameType(pframe)) - return true; - else - return false; + return GetFrameType(pframe) == WIFI_CTRL_TYPE; } /*----------------------------------------------------------------------------- Below is for the security related definition