| .. | .. |
|---|
| 102 | 102 | |
|---|
| 103 | 103 | spi_message_init(&m); |
|---|
| 104 | 104 | spi_message_add_tail(&t, &m); |
|---|
| 105 | | - return spi_sync(spi, &m); |
|---|
| 105 | + ret = spi_sync(spi, &m); |
|---|
| 106 | + if (m.actual_length && m.actual_length != n) |
|---|
| 107 | + pr_err("%s len=%d actual_length=%d\n", __func__, n, m.actual_length); |
|---|
| 108 | + |
|---|
| 109 | + return ret; |
|---|
| 106 | 110 | } |
|---|
| 107 | 111 | |
|---|
| 108 | 112 | int spi_read_slt(int id, void *rxbuf, size_t n) |
|---|
| .. | .. |
|---|
| 127 | 131 | |
|---|
| 128 | 132 | spi_message_init(&m); |
|---|
| 129 | 133 | spi_message_add_tail(&t, &m); |
|---|
| 130 | | - return spi_sync(spi, &m); |
|---|
| 134 | + ret = spi_sync(spi, &m); |
|---|
| 135 | + if (m.actual_length && m.actual_length != n) |
|---|
| 136 | + pr_err("%s len=%d actual_length=%d\n", __func__, n, m.actual_length); |
|---|
| 137 | + |
|---|
| 138 | + return ret; |
|---|
| 131 | 139 | } |
|---|
| 132 | 140 | |
|---|
| 133 | 141 | int spi_write_then_read_slt(int id, const void *txbuf, unsigned n_tx, |
|---|