Skip to contentSkip to conversation

mvumi: return a correct error code

PATCH New Dan Carpenter 1 participant 1 message Jan 19, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mvumi: return a correct error code

If kthread_create() fails then this should return an error code but the current code returns zero instead.

drivers/scsi/mvumi.c +1 -0
index 3e6b866..586f72b 100644
@@ -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);