summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-loopback-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi-loopback-test.c')
-rw-r--r--drivers/spi/spi-loopback-test.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/spi/spi-loopback-test.c b/drivers/spi/spi-loopback-test.c
index 894616f687b0..cf4bb36bee25 100644
--- a/drivers/spi/spi-loopback-test.c
+++ b/drivers/spi/spi-loopback-test.c
@@ -761,6 +761,7 @@ static int spi_test_run_iter(struct spi_device *spi,
test.iterate_transfer_mask = 1;
/* count number of transfers with tx/rx_buf != NULL */
+ rx_count = tx_count = 0;
for (i = 0; i < test.transfer_count; i++) {
if (test.transfers[i].tx_buf)
tx_count++;