projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
826cf17
)
spi: allow registering empty spi_board_info lists
author
Dmitry Torokhov
<dmitry.torokhov@gmail.com>
Tue, 28 Feb 2017 22:25:19 +0000
(14:25 -0800)
committer
Mark Brown
<broonie@kernel.org>
Mon, 6 Mar 2017 10:38:04 +0000
(11:38 +0100)
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>
drivers/spi/spi.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/spi/spi.c
b/drivers/spi/spi.c
index 6cc86060d22f005400bb5dcfb4bb4b91d4952596..f699ea530b88e6c0bbd24450185a3e140a76a15e 100644
(file)
--- a/
drivers/spi/spi.c
+++ b/
drivers/spi/spi.c
@@
-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)