summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/spi/spi.c2
-rw-r--r--include/linux/spi/spi.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 31d4d9d..7713253 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -851,7 +851,7 @@ out:
if (msg->status == -EINPROGRESS)
msg->status = ret;
- if (msg->status)
+ if (msg->status && master->handle_err)
master->handle_err(master, msg);
spi_finalize_current_message(master);
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 4eaac3a..5685af8 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -294,7 +294,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
* transfer_one_message are mutually exclusive; when both
* are set, the generic subsystem does not call your
* transfer_one callback.
- * @handle_err: the subsystem calls the driver to handle and error that occurs
+ * @handle_err: the subsystem calls the driver to handle an error that occurs
* in the generic implementation of transfer_one_message().
* @unprepare_message: undo any work done by prepare_message().
* @cs_gpios: Array of GPIOs to use as chip select lines; one per CS
OpenPOWER on IntegriCloud