Commit 10717b57 authored by yidong0635's avatar yidong0635 Committed by Tomasz Zawadzki
Browse files

nvme/nvme_transport: Unify returns in disconnect and connect.



Here "return rc == -EINPROGRESS ? 0 : rc;"
They  are the same meaning in these two functions.
Keep the comments here. This makes more clear to readers.

Signed-off-by: default avataryidong0635 <dongx.yi@intel.com>
Change-Id: I8590de3f0fe27337163ee8b02ea63e166f1bbe7c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5689


Community-CI: Broadcom CI
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent b2c29e91
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -554,10 +554,9 @@ nvme_transport_poll_group_disconnect_qpair(struct spdk_nvme_qpair *qpair)
			/* EINPROGRESS indicates that a call has already been made to this function.
			 * It just keeps us from segfaulting on a double removal/insert.
			 */
		} else if (rc == -EINPROGRESS) {
			rc = 0;
		}
		return rc;

		return rc == -EINPROGRESS ? 0 : rc;
	}

	return -EINVAL;