summaryrefslogtreecommitdiff
path: root/drivers/soc/tegra
diff options
context:
space:
mode:
authorNicolin Chen <nicoleotsuka@gmail.com>2020-11-18 20:44:57 -0800
committerThierry Reding <treding@nvidia.com>2020-11-19 11:43:49 +0100
commitb9ce9b0f83b536a4ac7de7567a265d28d13e5bea (patch)
tree85014feb677d4c2e38203633950cde8a43f82e58 /drivers/soc/tegra
parent6c37cb9fa67650c51b3a70c53202be31730d7e29 (diff)
soc/tegra: fuse: Fix index bug in get_process_id
This patch simply fixes a bug of referencing speedos[num] in every for-loop iteration in get_process_id function. Fixes: 0dc5a0d83675 ("soc/tegra: fuse: Add Tegra210 support") Cc: <stable@vger.kernel.org> Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/soc/tegra')
-rw-r--r--drivers/soc/tegra/fuse/speedo-tegra210.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soc/tegra/fuse/speedo-tegra210.c b/drivers/soc/tegra/fuse/speedo-tegra210.c
index 7394a8d694cb..695d0b7f9a8a 100644
--- a/drivers/soc/tegra/fuse/speedo-tegra210.c
+++ b/drivers/soc/tegra/fuse/speedo-tegra210.c
@@ -94,7 +94,7 @@ static int get_process_id(int value, const u32 *speedos, unsigned int num)
unsigned int i;
for (i = 0; i < num; i++)
- if (value < speedos[num])
+ if (value < speedos[i])
return i;
return -EINVAL;