Skip to contentSkip to conversation

scsi: storvsc: missing error code in storvsc_probe()

PATCH In review Long Li 2 participants 2 messages Feb 8, 2018 – Feb 9, 2018

Subsystems (3)
lore
Share & tools
lore

Long Li

author
#0 lore raw

PATCH 1/1 scsi: storvsc: missing error code in storvsc_probe()

From: Long Li <[email protected]>

This patch backports upstream commit ca8dc694045e9aa248e9916e0f614deb0494cb3d for 4.14-stable.

commit ca8dc694045e9aa248e9916e0f614deb0494cb3d:

We should set the error code if fc_remote_port_add() fails.

Cc <[email protected]> #v4.12+
Fixes daf0cd445a21 ("scsi: storvsc: Add support for FC rport.")
---
 drivers/scsi/storvsc_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/storvsc_drv.c +3 -1
index 5e7200f..c17ccb9 100644
@@ -1826,8 +1826,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_out3;
+		}
 	}
 #endif
 	return 0;
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 1 line · Long Li

From: Long Li <[email protected]>

No, Dan wrote the first patch here, don't change the authorship of a patch :(

Now fixed up by hand...