diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-01-16 13:40:22 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-02-03 17:58:36 +0100 |
commit | 5a313f217cddf1031782f18f72290845c680b195 (patch) | |
tree | 92987bad365f6fdeda4aca5478c85ef61f2c5b07 | |
parent | a63f24a621bd11c359e26582993feca2c1170afb (diff) | |
download | talos-op-linux-5a313f217cddf1031782f18f72290845c680b195.tar.gz talos-op-linux-5a313f217cddf1031782f18f72290845c680b195.zip |
scsi: storvsc: missing error code in storvsc_probe()
commit ca8dc694045e9aa248e9916e0f614deb0494cb3d upstream.
We should set the error code if fc_remote_port_add() fails.
Fixes: daf0cd445a21 ("scsi: storvsc: Add support for FC rport.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Cathy Avery <cavery@redhat.com>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/scsi/storvsc_drv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 3b3d1d050cac..40fc7a590e81 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1834,8 +1834,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; |