[patch] [SCSI] mvumi: return a correct error code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux