Skip to content

Commit 89c4b58

Browse files
tititiou36tsbogend
authored andcommitted
MIPS: Alchemy: Fix an out-of-bound access in db1200_dev_setup()
When calling spi_register_board_info(), we should pass the number of elements in 'db1200_spi_devs', not 'db1200_i2c_devs'. Fixes: 63323ec ("MIPS: Alchemy: Extended DB1200 board support.") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent 2f9060b commit 89c4b58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/mips/alchemy/devboards/db1200.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ int __init db1200_dev_setup(void)
847847
i2c_register_board_info(0, db1200_i2c_devs,
848848
ARRAY_SIZE(db1200_i2c_devs));
849849
spi_register_board_info(db1200_spi_devs,
850-
ARRAY_SIZE(db1200_i2c_devs));
850+
ARRAY_SIZE(db1200_spi_devs));
851851

852852
/* SWITCHES: S6.8 I2C/SPI selector (OFF=I2C ON=SPI)
853853
* S6.7 AC97/I2S selector (OFF=AC97 ON=I2S)

0 commit comments

Comments
 (0)