kthread_run() could return ERR_PTR(-EINTR) from kthread_create_on_node().
Return the actual error code in spi_init_queue() instead of mangling it to
-ENOMEM.

Signed-off-by: Jarkko Nikula <[email protected]>
---
 drivers/spi/spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 50f20f243981..da7e6225b8f6 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1001,7 +1001,7 @@ static int spi_init_queue(struct spi_master *master)
                                           dev_name(&master->dev));
        if (IS_ERR(master->kworker_task)) {
                dev_err(&master->dev, "failed to create message pump task\n");
-               return -ENOMEM;
+               return PTR_ERR(master->kworker_task);
        }
        init_kthread_work(&master->pump_messages, spi_pump_messages);
 
-- 
2.1.3

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to