+27
−36
Loading
Reorder a few operations and increment nvme_bdev_ctrlr->num_ns after allocating nvme_bdev_ctrlr->namespaces[i] successfully. Then unify the goto label for error cases to err and the err label simply calls nvme_bdev_ctrlr_delete(). There is one noticeable change in this patch. Previously the controller had not been detached when creating nvme_bdev_ctrlr failed. However, after this patch, the controller will be detached when creating nvme_bdev_ctrlr failed. This will be reasonable change. Signed-off-by:Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Ifd8c4649036f1c5e5cd688f89727b2bd2e982735 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8316 Community-CI: Mellanox Build Bot Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Ben Walker <benjamin.walker@intel.com> Reviewed-by:
Aleksey Marchuk <alexeymar@mellanox.com>