Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f974cf57 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Mark Brown
Browse files

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: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 826cf175
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)