Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 375493
b: refs/heads/master
c: 8ec5d84
h: refs/heads/master
i:
  375491: 81f37e1
v: v3
  • Loading branch information
Andreas Larsson authored and Grant Likely committed Apr 7, 2013
1 parent 7f77f7c commit 914314d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 446411e18b2cb17d153e45f634a3c9a79ada3ac2
refs/heads/master: 8ec5d84ef51cc64ed02bb9bf0e43a652178252c1
5 changes: 4 additions & 1 deletion trunk/drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1067,8 +1067,11 @@ static int of_spi_register_master(struct spi_master *master)
nb = of_gpio_named_count(np, "cs-gpios");
master->num_chipselect = max(nb, (int)master->num_chipselect);

if (nb < 1)
/* Return error only for an incorrectly formed cs-gpios property */
if (nb == 0 || nb == -ENOENT)
return 0;
else if (nb < 0)
return nb;

cs = devm_kzalloc(&master->dev,
sizeof(int) * master->num_chipselect,
Expand Down

0 comments on commit 914314d

Please sign in to comment.