From: Jarkko Nikula Date: Thu, 4 Dec 2014 09:02:25 +0000 (+0200) Subject: spi: core: Do not mangle error code from kthread_run() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=98a8f5a0538fe1a02a6a73a3451f1c093e30bdfc;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git spi: core: Do not mangle error code from kthread_run() 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 Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index ebcb33df2eb2..4395a5406e5c 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);