Skip to content

Commit 6112ff4

Browse files
hiss2018martinkpetersen
authored andcommitted
scsi: storvsc: Fix error return in storvsc_probe()
Return -ENOMEM from the error handling case instead of 0. Link: https://lore.kernel.org/r/20201127030206.104616-1-jingxiangfeng@huawei.com Fixes: 436ad94 ("scsi: storvsc: Allow only one remove lun work item to be issued per lun") Reviewed-by: Michael Kelley <mikelley@microsoft.com> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent e92643d commit 6112ff4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/scsi/storvsc_drv.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1994,8 +1994,10 @@ static int storvsc_probe(struct hv_device *device,
19941994
alloc_ordered_workqueue("storvsc_error_wq_%d",
19951995
WQ_MEM_RECLAIM,
19961996
host->host_no);
1997-
if (!host_dev->handle_error_wq)
1997+
if (!host_dev->handle_error_wq) {
1998+
ret = -ENOMEM;
19981999
goto err_out2;
2000+
}
19992001
INIT_WORK(&host_dev->host_scan_work, storvsc_host_scan);
20002002
/* Register the HBA and start the scsi bus scan */
20012003
ret = scsi_add_host(host, &device->device);

0 commit comments

Comments
 (0)