فهرست منبع

spi: loopback-test: don't skip comparing the first byte of rx_buf

When the loopback parameter is set, rx_buf are compared with tx_buf
after the spi_message is executed.  But the first byte of buffer is
not checked.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Akinobu Mita 8 سال پیش
والد
کامیت
8494801db1
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      drivers/spi/spi-loopback-test.c

+ 1 - 1
drivers/spi/spi-loopback-test.c

@@ -507,7 +507,7 @@ static int spi_test_check_loopback_result(struct spi_device *spi,
 			continue;
 		/* so depending on tx_buf we need to handle things */
 		if (xfer->tx_buf) {
-			for (i = 1; i < xfer->len; i++) {
+			for (i = 0; i < xfer->len; i++) {
 				txb = ((u8 *)xfer->tx_buf)[i];
 				rxb = ((u8 *)xfer->rx_buf)[i];
 				if (txb != rxb)