diff mbox series

[linux,dev-5.15,2/2] spi: core: Display return code when failing to transfer message

Message ID 20220525170240.33918-3-eajames@linux.ibm.com
State New
Headers show
Series spi: fsi: Fix spurious timeout | expand

Commit Message

Eddie James May 25, 2022, 5:02 p.m. UTC
All the other calls to the controller driver display the error
return code. The return code is helpful to understand what went
wrong, so include it when failing to transfer one message.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
---
 drivers/spi/spi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index d0bbf8f9414d..9bfaa6352b73 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1616,7 +1616,8 @@  static void __spi_pump_messages(struct spi_controller *ctlr, bool in_kthread)
 	ret = ctlr->transfer_one_message(ctlr, msg);
 	if (ret) {
 		dev_err(&ctlr->dev,
-			"failed to transfer one message from queue\n");
+			"failed to transfer one message from queue: %d\n",
+			ret);
 		goto out;
 	}