nvme: remove superfluous else statement
If the nvme completion was an error, the function will return, so there is no reason for an else statement. In fact, the else statement in nvme_ctrlr_identify_ns_async_done() differs from the coding style used in other nvme_ctrlr_identify_* functions, and arguably makes the code harder to read. Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Change-Id: If76b823b7ca04ab98abb2912927c344ee9f12314 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4265 Community-CI: Broadcom CI Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
c31fc45324
commit
a7de7dee23
@ -1617,10 +1617,10 @@ nvme_ctrlr_identify_ns_async_done(void *arg, const struct spdk_nvme_cpl *cpl)
|
||||
if (spdk_nvme_cpl_is_error(cpl)) {
|
||||
nvme_ctrlr_set_state(ctrlr, NVME_CTRLR_STATE_ERROR, NVME_TIMEOUT_INFINITE);
|
||||
return;
|
||||
} else {
|
||||
nvme_ns_set_identify_data(ns);
|
||||
}
|
||||
|
||||
nvme_ns_set_identify_data(ns);
|
||||
|
||||
/* move on to the next active NS */
|
||||
nsid = spdk_nvme_ctrlr_get_next_active_ns(ctrlr, ns->id);
|
||||
ns = spdk_nvme_ctrlr_get_ns(ctrlr, nsid);
|
||||
|
Loading…
Reference in New Issue
Block a user