Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87306
b: refs/heads/master
c: 2cfb8ce
h: refs/heads/master
v: v3
  • Loading branch information
Jan Nikitenko authored and Linus Torvalds committed Mar 13, 2008
1 parent 299260d commit 723c673
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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: 40369e1cdb71287662213ae214842899e77a0544
refs/heads/master: 2cfb8ce8c87802181ade74f5dadb3dded9bb4c7e
8 changes: 5 additions & 3 deletions trunk/drivers/spi/spi_bitbang.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,14 @@ static void bitbang_work(struct work_struct *work)
t->rx_dma = t->tx_dma = 0;
status = bitbang->txrx_bufs(spi, t);
}
if (status > 0)
m->actual_length += status;
if (status != t->len) {
if (status > 0)
status = -EMSGSIZE;
/* always report some kind of error */
if (status >= 0)
status = -EREMOTEIO;
break;
}
m->actual_length += status;
status = 0;

/* protocol tweaks before next transfer */
Expand Down

0 comments on commit 723c673

Please sign in to comment.