diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c index 266f7b674108e1b010a58df78046484374269fb8..aa81539374a6ece785118d69c5839d69b4235ad0 100644 --- a/drivers/md/dm-rq.c +++ b/drivers/md/dm-rq.c @@ -819,6 +819,8 @@ int dm_old_init_request_queue(struct mapped_device *md) init_kthread_worker(&md->kworker); md->kworker_task = kthread_run(kthread_worker_fn, &md->kworker, "kdmwork-%s", dm_device_name(md)); + if (IS_ERR(md->kworker_task)) + return PTR_ERR(md->kworker_task); elv_register_queue(md->queue);