diff mbox series

scsi: mvumi: Fix error return in mvumi_io_attach()

Message ID 20200910123848.93649-1-jingxiangfeng@huawei.com (mailing list archive)
State Accepted
Headers show
Series scsi: mvumi: Fix error return in mvumi_io_attach() | expand

Commit Message

Jing Xiangfeng Sept. 10, 2020, 12:38 p.m. UTC
Fix to return error code PTR_ERR() from the error handling case instead
of 0.

Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
 drivers/scsi/mvumi.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Martin K. Petersen Oct. 3, 2020, 1:43 a.m. UTC | #1
Jing,

> Fix to return error code PTR_ERR() from the error handling case instead
> of 0.

Applied to 5.10/scsi-staging, thanks!
Martin K. Petersen Oct. 7, 2020, 3:47 a.m. UTC | #2
On Thu, 10 Sep 2020 20:38:48 +0800, Jing Xiangfeng wrote:

> Fix to return error code PTR_ERR() from the error handling case instead
> of 0.

Applied to 5.10/scsi-queue, thanks!

[1/1] scsi: mvumi: Fix error return in mvumi_io_attach()
      https://git.kernel.org/mkp/scsi/c/055f15ab2cb4
diff mbox series

Patch

diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c
index 8906aceda4c4..0354898d7cac 100644
--- a/drivers/scsi/mvumi.c
+++ b/drivers/scsi/mvumi.c
@@ -2425,6 +2425,7 @@  static int mvumi_io_attach(struct mvumi_hba *mhba)
 	if (IS_ERR(mhba->dm_thread)) {
 		dev_err(&mhba->pdev->dev,
 			"failed to create device scan thread\n");
+		ret = PTR_ERR(mhba->dm_thread);
 		mutex_unlock(&mhba->sas_discovery_mutex);
 		goto fail_create_thread;
 	}