Currently it's unclear from the documentation if an actual driver may or may not override the message->status field. It seems there is no other way to indicate an error when transfer is failed, e.g. when gets overrun or underrun interrupt. The patch states this clearly in the comments near to field definition. Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> --- include/linux/spi/spi.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index ed9489d..92cff9a 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -680,6 +680,9 @@ struct spi_message { void *context; unsigned frame_length; unsigned actual_length; + + /* The actual driver may set this field to indicate an error, e.g. -EIO + * for failed transfer. */ int status; /* for optional use by whatever driver currently owns the -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html