diff --git a/drivers/spi/spi-rockchip-test.c b/drivers/spi/spi-rockchip-test.c index 20af47d09828..544d6038919a 100644 --- a/drivers/spi/spi-rockchip-test.c +++ b/drivers/spi/spi-rockchip-test.c @@ -74,7 +74,11 @@ int spi_write_slt(int id, const void *txbuf, size_t n) spi_message_init(&m); spi_message_add_tail(&t, &m); - return spi_sync(spi, &m); + ret = spi_sync(spi, &m); + if (m.actual_length && m.actual_length != n) + pr_err("%s len=%d actual_length=%d\n", __func__, n, m.actual_length); + + return ret; } int spi_read_slt(int id, void *rxbuf, size_t n) @@ -99,7 +103,11 @@ int spi_read_slt(int id, void *rxbuf, size_t n) spi_message_init(&m); spi_message_add_tail(&t, &m); - return spi_sync(spi, &m); + ret = spi_sync(spi, &m); + if (m.actual_length && m.actual_length != n) + pr_err("%s len=%d actual_length=%d\n", __func__, n, m.actual_length); + + return ret; } int spi_write_then_read_slt(int id, const void *txbuf, unsigned n_tx,