提交 ca8dc694 编写于 作者: D Dan Carpenter 提交者: 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: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NCathy Avery <cavery@redhat.com>
Acked-by: NK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 332b4b2a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册