Skip to content

Commit

Permalink
scsi: storvsc: Fix error return in storvsc_probe()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jing Xiangfeng authored and Martin K. Petersen committed Dec 1, 2020
1 parent e92643d commit 6112ff4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/scsi/storvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1994,8 +1994,10 @@ static int storvsc_probe(struct hv_device *device,
alloc_ordered_workqueue("storvsc_error_wq_%d",
WQ_MEM_RECLAIM,
host->host_no);
if (!host_dev->handle_error_wq)
if (!host_dev->handle_error_wq) {
ret = -ENOMEM;
goto err_out2;
}
INIT_WORK(&host_dev->host_scan_work, storvsc_host_scan);
/* Register the HBA and start the scsi bus scan */
ret = scsi_add_host(host, &device->device);
Expand Down

0 comments on commit 6112ff4

Please sign in to comment.