diff options
-rw-r--r-- | drivers/md/dm-log-writes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-log-writes.c b/drivers/md/dm-log-writes.c index ba24f4f37efc..49e4d8d4558f 100644 --- a/drivers/md/dm-log-writes.c +++ b/drivers/md/dm-log-writes.c | |||
@@ -459,9 +459,9 @@ static int log_writes_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
459 | goto bad; | 459 | goto bad; |
460 | } | 460 | } |
461 | 461 | ||
462 | ret = -EINVAL; | ||
463 | lc->log_kthread = kthread_run(log_writes_kthread, lc, "log-write"); | 462 | lc->log_kthread = kthread_run(log_writes_kthread, lc, "log-write"); |
464 | if (!lc->log_kthread) { | 463 | if (IS_ERR(lc->log_kthread)) { |
464 | ret = PTR_ERR(lc->log_kthread); | ||
465 | ti->error = "Couldn't alloc kthread"; | 465 | ti->error = "Couldn't alloc kthread"; |
466 | dm_put_device(ti, lc->dev); | 466 | dm_put_device(ti, lc->dev); |
467 | dm_put_device(ti, lc->logdev); | 467 | dm_put_device(ti, lc->logdev); |