Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp453340pxb; Thu, 9 Sep 2021 04:57:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyU6HA6a6hWHkb96BBq5aPWk6GxqpA40/pj4GkG4x2qnBqUsyJnmyyC+TUa4Ix14aW0ecSB X-Received: by 2002:a50:bae1:: with SMTP id x88mr2766241ede.345.1631188677809; Thu, 09 Sep 2021 04:57:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631188677; cv=none; d=google.com; s=arc-20160816; b=Y2pe4aS6GpDG2BvSnmJxYohw/ru9JMfeko54+IzVWt09k9ffLwuFIdML1H1q8b3lrq yGisdWi7ofqNQtTn6Oy064WFcdJV7eMV79UPJZW7EgRcl0eCsgdKn0kCyPbsRwWITe33 oGYE3Z+Ss4dPZCodcXZP1TKu9s3XrSckXr884pFcZ1CwYdXTUirP4heTkDqs95JAG+tv YFRN4qBC2XURYf7m5MVdk63An5KASj8yyda9TjGfmMUPjd7EGtek9gGh5+rzJ+VAHvEH gxpvtyJKU4VXRaFgCNGHbnIsXiYvY//TuGXN15xkYUq6zu8VNUXU5QHiKkYmxDsKxArZ 4ncA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=05Vu8owAffdIhLvXSB4/DZuT0CfgxvfNPsxk4fFLuKc=; b=BMPGqIQez7KpF5g+n2IqyQTWhWKj3tniPTs6OM0H2nXKn/DjzX1soWzJ3vazxj9OSR nDgD0GoRB9uFUFrkPEovBgTvG/+5t/I1vvJAhB5Je85lbFPP0/QRMg2yMcLu+fjNj7kT 6BIZd0tJZCqLhOkS755+KmJh+EvHtHMBHRtTr6AJqvhXFKj/aQvYLXMtAafPFB1nk2kb aCgvr9Fjs9WJ+Wag6P5pBGQUFLvBMFH7HQlk1odTbCh0d4OTKEHuHHzRyfvMXhiDBUvx za+QXKUKN/DniEXhHuPQsvDiOjKqLYUGoInknyq3R+au0miwu2dlbMMkAmH4HFxAV0dd PItw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rsKhzW22; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h25si1573926edv.624.2021.09.09.04.57.33; Thu, 09 Sep 2021 04:57:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rsKhzW22; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237467AbhIILyJ (ORCPT + 99 others); Thu, 9 Sep 2021 07:54:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:55596 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242139AbhIILv0 (ORCPT ); Thu, 9 Sep 2021 07:51:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 530AF6127C; Thu, 9 Sep 2021 11:44:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631187847; bh=4F/FtUHaVA8ntObtQdHZamsH2x118d5OxzvWksJvNb0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rsKhzW22YxAzO8zupYh3C5b/FrImsLCW+HDMrm4lDsnKP7j/Z4MfRg84Rkr3lfiSZ Nhjj8aQhswRp1VLu4Lfn+0ar0jwkTBTQNjcBDIbvZl0+JrP/28BxeAdVJVuV9j+AUh +rfYka/IzufZU3OK0wdYbCxzey+7wZHZnbAscaisP2foQI7yJ8QG2EjNAwgV3isWuD PEJRqEMWMDfDlrLssAULxSOBsReC7GaxVg/qlIWnldhdPp9JbBzs8793ONettuWV/P p2+t5C/jLhNWPm4rP78ZrMb4ltn9eQ9qksIEc4r/cKhehexz09SBRMC69/3OmxLZ/j ccnvgygpwobRw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Fabio Aiuto , Greg Kroah-Hartman , Sasha Levin , linux-staging@lists.linux.dev Subject: [PATCH AUTOSEL 5.14 139/252] staging: rtl8723bs: fix right side of condition Date: Thu, 9 Sep 2021 07:39:13 -0400 Message-Id: <20210909114106.141462-139-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909114106.141462-1-sashal@kernel.org> References: <20210909114106.141462-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fabio Aiuto [ Upstream commit e3678dc1ea40425b7218c20e2fe7b00a72f23a41 ] 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 Signed-off-by: Sasha Levin --- drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index bb7941aee0c4..fcf31f6d4b36 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -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) { -- 2.30.2