summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorEwan D. Milne <emilne@redhat.com>2018-01-05 18:44:06 +0100
committerChristoph Hellwig <hch@lst.de>2018-01-08 10:52:03 +0100
commit6b018235b4daabae96d855219fae59c3fb8be417 (patch)
tree0560d3a87b1722bfb4e946a9e2b4b07b153bcb43 /drivers
parentnvme-fcloop: avoid possible uninitialized variable warning (diff)
downloadlinux-6b018235b4daabae96d855219fae59c3fb8be417.tar.xz
linux-6b018235b4daabae96d855219fae59c3fb8be417.zip
nvme-fabrics: initialize default host->id in nvmf_host_default()
The field was uninitialized before use. Signed-off-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/nvme/host/fabrics.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index 76b4fe6816a0..894c2ccb3891 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -74,6 +74,7 @@ static struct nvmf_host *nvmf_host_default(void)
return NULL;
kref_init(&host->ref);
+ uuid_gen(&host->id);
snprintf(host->nqn, NVMF_NQN_SIZE,
"nqn.2014-08.org.nvmexpress:uuid:%pUb", &host->id);