From: Fabio Aiuto Date: Sat, 7 Aug 2021 09:48:00 +0000 (+0200) Subject: staging: rtl8723bs: fix right side of condition X-Git-Tag: v5.15~425^2~205 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e3678dc1ea40425b7218c20e2fe7b00a72f23a41;p=platform%2Fkernel%2Flinux-starfive.git staging: rtl8723bs: fix right side of condition TxNum value is compared against ODM_RF_PATH_D, which is inconsistent. Compare it against RF_MAX_TX_NUM, as in other places in the same file. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/147631fe6f4f5de84cc54a62ba71d739b92697be.1628329348.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 03c174a..a47a0a1 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -350,7 +350,7 @@ static void PHY_StoreTxPowerByRateNew( if (RfPath > ODM_RF_PATH_D) return; - if (TxNum > ODM_RF_PATH_D) + if (TxNum > RF_MAX_TX_NUM) return; for (i = 0; i < rateNum; ++i) {