summaryrefslogtreecommitdiff
path: root/drivers/scsi/storvsc_drv.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-01-16 13:40:22 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2018-01-17 01:16:30 -0500
commitca8dc694045e9aa248e9916e0f614deb0494cb3d (patch)
tree4d50245137b7765289b4237ebbf2c371a7f2bb05 /drivers/scsi/storvsc_drv.c
parent332b4b2a6f380e07ccdd72da7f42f11f6b333784 (diff)
scsi: storvsc: missing error code in storvsc_probe()
We should set the error code if fc_remote_port_add() fails. Cc: <stable@vger.kernel.org> #v4.12+ Fixes: daf0cd445a21 ("scsi: storvsc: Add support for FC rport.") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Cathy Avery <cavery@redhat.com> Acked-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/storvsc_drv.c')
-rw-r--r--drivers/scsi/storvsc_drv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 1b06cf0375dc..e07907d91d04 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1833,8 +1833,10 @@ static int storvsc_probe(struct hv_device *device,
fc_host_node_name(host) = stor_device->node_name;
fc_host_port_name(host) = stor_device->port_name;
stor_device->rport = fc_remote_port_add(host, 0, &ids);
- if (!stor_device->rport)
+ if (!stor_device->rport) {
+ ret = -ENOMEM;
goto err_out4;
+ }
}
#endif
return 0;