spi: core: Do not mangle error code from kthread_run()
PATCH 1/1 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.
--- drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi.c +1 -1
@@ -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);
Signature · 6 lines
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
Mark Brown
AppliedQuoted 3 lines · Jarkko Nikula
kthread_run()could returnERR_PTR(-EINTR)fromkthread_create_on_node(). Return the actual error code inspi_init_queue()instead of mangling it to-ENOMEM.
Applied, thanks.