Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109794
b: refs/heads/master
c: aa77d96
h: refs/heads/master
v: v3
  • Loading branch information
Peter Korsgaard authored and Linus Torvalds committed Sep 13, 2008
1 parent 46c9d8b commit 0faada7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 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: 53604dbe1371c3c4458c2d741adbd8cfd8fe8e79
refs/heads/master: aa77d96ba94326db4f50d2aa36602824dd03286a
13 changes: 11 additions & 2 deletions trunk/drivers/spi/spi_mpc83xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,20 @@ static int mpc83xx_spi_bufs(struct spi_device *spi, struct spi_transfer *t)
if (t->bits_per_word)
bits_per_word = t->bits_per_word;
len = t->len;
if (bits_per_word > 8)
if (bits_per_word > 8) {
/* invalid length? */
if (len & 1)
return -EINVAL;
len /= 2;
if (bits_per_word > 16)
}
if (bits_per_word > 16) {
/* invalid length? */
if (len & 1)
return -EINVAL;
len /= 2;
}
mpc83xx_spi->count = len;

INIT_COMPLETION(mpc83xx_spi->done);

/* enable rx ints */
Expand Down

0 comments on commit 0faada7

Please sign in to comment.