diff options
author | Nicolin Chen <nicoleotsuka@gmail.com> | 2020-11-19 07:44:57 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2020-11-19 13:43:49 +0300 |
commit | b9ce9b0f83b536a4ac7de7567a265d28d13e5bea (patch) | |
tree | 85014feb677d4c2e38203633950cde8a43f82e58 /drivers/soc/tegra/fuse | |
parent | 6c37cb9fa67650c51b3a70c53202be31730d7e29 (diff) | |
download | linux-b9ce9b0f83b536a4ac7de7567a265d28d13e5bea.tar.xz |
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/fuse')
-rw-r--r-- | drivers/soc/tegra/fuse/speedo-tegra210.c | 2 |
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; |