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:35:50 +0000 (15:35 -0800)
commitb6e72854e019dc5f7dc8f27f344f95914802207e
tree6fa42956b4c28035e027e9483e74e06ca8e9d31b
parent9b2f64ba99bf4cdc3df39ebf75bbf0d95a0c19e5
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