]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
MIPS: Alchemy: Fix an out-of-bound access in db1200_dev_setup()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 10 Jan 2024 18:07:36 +0000 (19:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:27:45 +0000 (15:27 -0800)
commit2504864be6fdcc2829babd01d22d3061fd21a9ac
treea9b01339b156c7a994a3d08003efbd3ee1a926f7
parent69e9a6944df730353fb350057c37918fae2746ac
MIPS: Alchemy: Fix an out-of-bound access in db1200_dev_setup()

[ Upstream commit 89c4b588d11e9acf01d604de4b0c715884f59213 ]

When calling spi_register_board_info(), we should pass the number of
elements in 'db1200_spi_devs', not 'db1200_i2c_devs'.

Fixes: 63323ec54a7e ("MIPS: Alchemy: Extended DB1200 board support.")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/mips/alchemy/devboards/db1200.c