]> www.infradead.org Git - users/jedix/linux-maple.git/commit
i2c: npcm: restore slave addresses array length
authorTyrone Ting <kfting@nuvoton.com>
Fri, 30 Aug 2024 03:46:34 +0000 (11:46 +0800)
committerAndi Shyti <andi.shyti@kernel.org>
Mon, 9 Sep 2024 22:36:46 +0000 (00:36 +0200)
commit8f65c4552d5d968572162bf1a65e53a80b72f937
tree3d844bfb7a4720b371eb30f415826a3244df9f74
parent016b221209f43be864c880c521a3c0e1d9ef1c16
i2c: npcm: restore slave addresses array length

The smatch check warning is "buffer overflow 'npcm_i2caddr' 2 <= 9".
The original design supports 10 target addresses although only 2
addresses are required for current implementation.

Restore the npcm_i2caddr array length to fix the smatch warning.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202408130818.FgDP5uNm-lkp@intel.com/
Signed-off-by: Tyrone Ting <kfting@nuvoton.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/busses/i2c-npcm7xx.c