* [patch] [SCSI] mvumi: return a correct error code
@ 2015-01-19 14:42 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2015-01-19 14:42 UTC (permalink / raw)
To: James E.J. Bottomley; +Cc: linux-scsi, kernel-janitors
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@oracle.com>
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [patch] [SCSI] mvumi: return a correct error code
@ 2015-01-19 14:42 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2015-01-19 14:42 UTC (permalink / raw)
To: James E.J. Bottomley; +Cc: linux-scsi, kernel-janitors
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@oracle.com>
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-19 14:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-19 14:42 [patch] [SCSI] mvumi: return a correct error code Dan Carpenter
2015-01-19 14:42 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.