From ae5b75f72eb9f2068ae856a7a45bf1093d188df2 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Fri, 28 Nov 2025 14:35:20 +0100 Subject: [PATCH] fabrics: interpret return code from nvme_create_ctrl correctly When changing how the return code handling is done, nvmf_connect_disc_entry was not correctly updated. When all is good there is no error code return. Fixes: f4c6eee2939d ("rrc: return error codes directly") Signed-off-by: Daniel Wagner --- libnvme/src/nvme/fabrics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnvme/src/nvme/fabrics.c b/libnvme/src/nvme/fabrics.c index d9500eb6e6..7660b5f33a 100644 --- a/libnvme/src/nvme/fabrics.c +++ b/libnvme/src/nvme/fabrics.c @@ -1041,7 +1041,7 @@ int nvmf_connect_disc_entry(nvme_host_t h, ret = nvme_create_ctrl(h->ctx, e->subnqn, transport, traddr, cfg->host_traddr, cfg->host_iface, trsvcid, &c); - if (!ret) { + if (ret) { nvme_msg(h->ctx, LOG_DEBUG, "skipping discovery entry, " "failed to allocate %s controller with traddr %s\n", transport, traddr);