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>
This commit is contained in:
parent
826cf175ed
commit
f974cf57b1
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user