scsi: mvumi: Fix error return in mvumi_io_attach()
authorJing Xiangfeng <jingxiangfeng@huawei.com>
Thu, 10 Sep 2020 12:38:48 +0000 (20:38 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 3 Oct 2020 01:42:22 +0000 (21:42 -0400)
Return PTR_ERR() from the error handling case instead of 0.

Link: https://lore.kernel.org/r/20200910123848.93649-1-jingxiangfeng@huawei.com
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mvumi.c

index 8906aceda4c43ddd950394be27fe92afd3721e30..0354898d7cac1fa1961a6cf8eedd61734d3a61f6 100644 (file)
@@ -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;
        }