1
0
Fork 0

soc/tegra: fuse: Fix index bug in get_process_id

commit b9ce9b0f83 upstream.

This patch simply fixes a bug of referencing speedos[num] in every
for-loop iteration in get_process_id function.

Fixes: 0dc5a0d836 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5.4-rM2-2.2.x-imx-squashed
Nicolin Chen 2020-11-18 20:44:57 -08:00 committed by Greg Kroah-Hartman
parent 037c65990d
commit 80cb945070
1 changed files with 1 additions and 1 deletions

View File

@ -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;