Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56877
b: refs/heads/master
c: da90fa8
h: refs/heads/master
i:
  56875: 7d75f28
v: v3
  • Loading branch information
Domen Puncer authored and Linus Torvalds committed May 24, 2007
1 parent 2651063 commit f2c3901
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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: b7add02d6247bff34005e040347d81777c80931c
refs/heads/master: da90fa8ff671a0139772ec3b3e82c06077e82122
12 changes: 6 additions & 6 deletions trunk/drivers/spi/spidev.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ static int spidev_message(struct spidev_data *spidev,
n--, k_tmp++, u_tmp++) {
k_tmp->len = u_tmp->len;

total += k_tmp->len;
if (total > bufsiz) {
status = -EMSGSIZE;
goto done;
}

if (u_tmp->rx_buf) {
k_tmp->rx_buf = buf;
if (!access_ok(VERIFY_WRITE, u_tmp->rx_buf, u_tmp->len))
Expand All @@ -179,12 +185,6 @@ static int spidev_message(struct spidev_data *spidev,
u_tmp->len))
goto done;
}

total += k_tmp->len;
if (total > bufsiz) {
status = -EMSGSIZE;
goto done;
}
buf += k_tmp->len;

k_tmp->cs_change = !!u_tmp->cs_change;
Expand Down

0 comments on commit f2c3901

Please sign in to comment.