1
0
Fork 0

spi: allow registering empty spi_board_info lists

Many boards form list of spi_board_info entries depending on config,
and it is possible to end up with empty list. Do not report error
in such cases.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
hifive-unleashed-5.1
Dmitry Torokhov 2017-02-28 14:25:19 -08:00 committed by Mark Brown
parent 826cf175ed
commit f974cf57b1
1 changed files with 1 additions and 1 deletions

View File

@ -690,7 +690,7 @@ int spi_register_board_info(struct spi_board_info const *info, unsigned n)
int i;
if (!n)
return -EINVAL;
return 0;
bi = kcalloc(n, sizeof(*bi), GFP_KERNEL);
if (!bi)