Skip to content

Commit 6b01823

Browse files
Ewan D. MilneChristoph Hellwig
authored andcommitted
nvme-fabrics: initialize default host->id in nvmf_host_default()
The field was uninitialized before use. Signed-off-by: Ewan D. Milne <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 254beb8 commit 6b01823

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/nvme/host/fabrics.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ static struct nvmf_host *nvmf_host_default(void)
7474
return NULL;
7575

7676
kref_init(&host->ref);
77+
uuid_gen(&host->id);
7778
snprintf(host->nqn, NVMF_NQN_SIZE,
7879
"nqn.2014-08.org.nvmexpress:uuid:%pUb", &host->id);
7980

0 commit comments

Comments
 (0)