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/[email protected] Fixes: 436ad94 ("scsi: storvsc: Allow only one remove lun work item to be issued per lun") Reviewed-by: Michael Kelley <[email protected]> Signed-off-by: Jing Xiangfeng <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent e92643d commit 6112ff4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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)