If kthread_create() fails then this should return an error code but the current code returns zero instead. Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c index 3e6b866..586f72b 100644 --- a/drivers/scsi/mvumi.c +++ b/drivers/scsi/mvumi.c @@ -2477,6 +2477,7 @@ static int mvumi_io_attach(struct mvumi_hba *mhba) dev_err(&mhba->pdev->dev, "failed to create device scan thread\n"); mutex_unlock(&mhba->sas_discovery_mutex); + ret = PTR_ERR(mhba->dm_thread); goto fail_create_thread; } atomic_set(&mhba->pnp_count, 1); -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html