提交 f974cf57 编写于 作者: D Dmitry Torokhov 提交者: Mark Brown

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: NDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 826cf175
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册