]> Git Repo - linux.git/commitdiff
soc/tegra: fuse: Fix index bug in get_process_id
authorNicolin Chen <[email protected]>
Thu, 19 Nov 2020 04:44:57 +0000 (20:44 -0800)
committerThierry Reding <[email protected]>
Thu, 19 Nov 2020 10:43:49 +0000 (11:43 +0100)
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: <[email protected]>
Signed-off-by: Nicolin Chen <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
drivers/soc/tegra/fuse/speedo-tegra210.c

index 7394a8d694cb92201fea9513af2b2cad5cbbce90..695d0b7f9a8abe53c497155603147420cda40b63 100644 (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;
This page took 0.060892 seconds and 4 git commands to generate.