]> git.baikalelectronics.ru Git - kernel.git/commitdiff
spi: core: Display return code when failing to transfer message
authorEddie James <eajames@linux.ibm.com>
Wed, 25 May 2022 16:58:52 +0000 (11:58 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 26 May 2022 13:43:29 +0000 (14:43 +0100)
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>
Link: https://lore.kernel.org/r/20220525165852.33167-3-eajames@linux.ibm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c

index 136bd0e51ada07b254d331868a6358f74041424e..bbc8d4448e7925db83167cff4caa5081cf9152f9 100644 (file)
@@ -1672,7 +1672,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;
        }