From ca998b329e1334dfbf0247e48ded753c6fb11372 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Thu, 3 Nov 2016 08:32:50 -0700 Subject: [PATCH] nvme: fix duplicate PCI address check The initialization of dev_addr was replaced with probe_info.pci_addr, but its use in spdk_pci_addr_compare() wasn't replaced to match. Fixes commit fcb00f37807a39d58bc29de3055008f7169fb91e (nvme: expand probe information to a struct). Change-Id: Ic4c273d2aa0bf1f9e3e1527f3ab09d3c019158cd Signed-off-by: Daniel Verkamp --- lib/nvme/nvme.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/nvme/nvme.c b/lib/nvme/nvme.c index cb4805276..1ae960912 100644 --- a/lib/nvme/nvme.c +++ b/lib/nvme/nvme.c @@ -231,7 +231,6 @@ nvme_enum_cb(void *ctx, struct spdk_pci_device *pci_dev) struct nvme_enum_ctx *enum_ctx = ctx; struct spdk_nvme_ctrlr *ctrlr; struct spdk_nvme_ctrlr_opts opts; - struct spdk_pci_addr dev_addr; struct spdk_nvme_probe_info probe_info; probe_info.pci_addr = spdk_pci_device_get_addr(pci_dev); @@ -243,7 +242,7 @@ nvme_enum_cb(void *ctx, struct spdk_pci_device *pci_dev) * different per each process, we compare by BDF to determine whether it is the * same controller. */ - if (spdk_pci_addr_compare(&dev_addr, &ctrlr->probe_info.pci_addr) == 0) { + if (spdk_pci_addr_compare(&probe_info.pci_addr, &ctrlr->probe_info.pci_addr) == 0) { return 0; } }