diff options
| -rw-r--r-- | drivers/spi/spi-atmel.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index 485e6cce94bf..e6fe837d49fb 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c | |||
| @@ -874,8 +874,9 @@ atmel_spi_pump_pio_data(struct atmel_spi *as, struct spi_transfer *xfer) | |||
| 874 | spi_readl(as, RDR); | 874 | spi_readl(as, RDR); |
| 875 | } | 875 | } |
| 876 | if (xfer->bits_per_word > 8) { | 876 | if (xfer->bits_per_word > 8) { |
| 877 | as->current_remaining_bytes -= 2; | 877 | if (as->current_remaining_bytes > 2) |
| 878 | if (as->current_remaining_bytes < 0) | 878 | as->current_remaining_bytes -= 2; |
| 879 | else | ||
| 879 | as->current_remaining_bytes = 0; | 880 | as->current_remaining_bytes = 0; |
| 880 | } else { | 881 | } else { |
| 881 | as->current_remaining_bytes--; | 882 | as->current_remaining_bytes--; |
