Skip to content

Commit

Permalink
staging: rtl8723bs: fix right side of condition
Browse files Browse the repository at this point in the history
[ Upstream commit e3678dc ]

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 <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/147631fe6f4f5de84cc54a62ba71d739b92697be.1628329348.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
fabioaiuto authored and gregkh committed Sep 18, 2021
1 parent 55d64a9 commit 5b909c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
Expand Up @@ -463,7 +463,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) {
Expand Down

0 comments on commit 5b909c8

Please sign in to comment.