nvmf: correct the return code when parsing the subsystem

If succeeded, return 0. Otherwise, return -1

Change-Id: I7c966e09a5efd13a3ddb72ffaaeee4a9d8ca31b0
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476983
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
This commit is contained in:
GangCao 2019-12-06 13:48:29 -05:00 committed by Tomasz Zawadzki
parent f4e3f59e0e
commit b8d0691ff3

View File

@ -496,7 +496,7 @@ spdk_nvmf_parse_subsystem(struct spdk_conf_section *sp)
spdk_nvmf_subsystem_set_allow_any_host(subsystem, allow_any_host);
done:
return (subsystem != NULL);
return (subsystem != NULL) ? 0 : -1;
}
static int