vhost: return proper rc on vhost_dev_register() alloc failure

This must've been overlooked in patch 601bcbcf.

Fixes: 601bcbcf6665 ("util: extend cpumask to hold more than 64 cpus")
Change-Id: Ia7e06fcacba5cd99770b81542678550e9fbc3ca2
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/399455
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Dariusz Stojaczyk 2018-02-12 21:52:34 +01:00 committed by Jim Harris
parent 32ad027b0c
commit 720c627a93

View File

@ -631,7 +631,7 @@ spdk_vhost_dev_register(struct spdk_vhost_dev *vdev, const char *name, const cha
cpumask = spdk_cpuset_alloc();
if (!cpumask) {
SPDK_ERRLOG("spdk_cpuset_alloc failed\n");
return -1;
return -ENOMEM;
}
if (spdk_vhost_parse_core_mask(mask_str, cpumask) != 0) {