mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
parent
826cf175ed
commit
f974cf57b1
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue