mirror of https://gitee.com/openkylin/linux.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 <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
b671358ad7
commit
98a8f5a053
|
@ -1001,7 +1001,7 @@ static int spi_init_queue(struct spi_master *master)
|
||||||
dev_name(&master->dev));
|
dev_name(&master->dev));
|
||||||
if (IS_ERR(master->kworker_task)) {
|
if (IS_ERR(master->kworker_task)) {
|
||||||
dev_err(&master->dev, "failed to create message pump task\n");
|
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);
|
init_kthread_work(&master->pump_messages, spi_pump_messages);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue