summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorJarkko Nikula <jarkko.nikula@linux.intel.com>2014-12-04 12:02:25 +0300
committerMark Brown <broonie@kernel.org>2014-12-05 01:42:37 +0300
commit98a8f5a0538fe1a02a6a73a3451f1c093e30bdfc (patch)
tree6f64dddd273478beae4bf5e288c163b4fca667ec /drivers/spi
parentb671358ad7916beb7ca9e5c304ae88afc7da4557 (diff)
downloadlinux-98a8f5a0538fe1a02a6a73a3451f1c093e30bdfc.tar.xz
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 <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi.c2
1 files changed, 1 insertions, 1 deletions
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);