Skip to content

Commit 7c0f3fd

Browse files
committed
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: f4c6eee ("rrc: return error codes directly") Signed-off-by: Daniel Wagner <[email protected]>
1 parent 0841ca0 commit 7c0f3fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libnvme/src/nvme/fabrics.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ int nvmf_connect_disc_entry(nvme_host_t h,
10411041

10421042
ret = nvme_create_ctrl(h->ctx, e->subnqn, transport, traddr,
10431043
cfg->host_traddr, cfg->host_iface, trsvcid, &c);
1044-
if (!ret) {
1044+
if (ret) {
10451045
nvme_msg(h->ctx, LOG_DEBUG, "skipping discovery entry, "
10461046
"failed to allocate %s controller with traddr %s\n",
10471047
transport, traddr);

0 commit comments

Comments
 (0)