mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
scsi: storvsc: missing error code in storvsc_probe()
We should set the error code if fc_remote_port_add() fails.
Cc: <[email protected]> #v4.12+
Fixes: daf0cd445a ("scsi: storvsc: Add support for FC rport.")
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Cathy Avery <[email protected]>
Acked-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
This commit is contained in:
committed by
Martin K. Petersen
parent
332b4b2a6f
commit
ca8dc69404
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user