aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c/nx_i2c.c
diff options
context:
space:
mode:
authorPaul Barker <paul.barker.ct@bp.renesas.com>2023-08-18 14:17:21 +0100
committerMarek Vasut <marek.vasut+renesas@mailbox.org>2023-08-19 16:34:41 +0200
commitdbada49554edd16da39134815635fd0015725c9e (patch)
tree6692b32bf8823ff719e1fe62c6d91d32b1c7c377 /drivers/i2c/nx_i2c.c
parentbb89d926fc66fc754915f0300c77815e7db9327f (diff)
arm: rmobile: Fix off-by-one error in cpuinfo
In rmobile_cpuinfo_idx() there is an off-by-one error in accessing the rmobile_cpuinfo array. At the end of the loop, i is equal to the array size, i.e. rmobile_cpuinfo[i] accesses one entry past the end of the array. The last entry in the array is a fallback value so the loop should count to ARRAY_SIZE(rmobile_cpuinfo) - 1 instead, this will leave i equal to the index of the fallback value if no match is found. Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Diffstat (limited to 'drivers/i2c/nx_i2c.c')
0 files changed, 0 insertions, 0 deletions