Commit ca8dc694 authored by Dan Carpenter's avatar Dan Carpenter Committed by Martin K. Petersen

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: daf0cd44 ("scsi: storvsc: Add support for FC rport.")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarCathy Avery <cavery@redhat.com>
Acked-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 332b4b2a
...@@ -1833,9 +1833,11 @@ static int storvsc_probe(struct hv_device *device, ...@@ -1833,9 +1833,11 @@ static int storvsc_probe(struct hv_device *device,
fc_host_node_name(host) = stor_device->node_name; fc_host_node_name(host) = stor_device->node_name;
fc_host_port_name(host) = stor_device->port_name; fc_host_port_name(host) = stor_device->port_name;
stor_device->rport = fc_remote_port_add(host, 0, &ids); stor_device->rport = fc_remote_port_add(host, 0, &ids);
if (!stor_device->rport) if (!stor_device->rport) {
ret = -ENOMEM;
goto err_out4; goto err_out4;
} }
}
#endif #endif
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment