提交 b9ce9b0f 编写于 作者: N Nicolin Chen 提交者: 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: NNicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: NThierry Reding <treding@nvidia.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册