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: yidong0635 <dongx.yi@intel.com>
Change-Id: I8590de3f0fe27337163ee8b02ea63e166f1bbe7c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5689
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
yidong0635 2020-12-24 04:50:28 -05:00 committed by Tomasz Zawadzki
parent b2c29e91c5
commit 10717b577c

View File

@ -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;