Commit b9ce9b0f authored by Nicolin Chen's avatar Nicolin Chen Committed by Thierry Reding

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: 0dc5a0d8 ("soc/tegra: fuse: Add Tegra210 support")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarNicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 6c37cb9f
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment