Skip to contentSkip to conversation

FAILED: patch "[PATCH] scsi: storvsc: missing error code in storvsc_probe()" failed to apply to 4.14-stable tree

PATCH [email protected] 1 participant 1 message Feb 1, 2018

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

Quoted 1 line

From ca8dc694045e9aa248e9916e0f614deb0494cb3d Mon Sep 17 00:00:00 2001

From: Dan Carpenter <[email protected]>
Date: Tue, 16 Jan 2018 13:40:22 +0300
Subject: [PATCH] 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 daf0cd445a21 ("scsi: storvsc: Add support for FC rport.")
drivers/scsi/storvsc_drv.c +3 -1
index 1b06cf0375dc..e07907d91d04 100644
@@ -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;