Commit 720c627a authored by Dariusz Stojaczyk's avatar Dariusz Stojaczyk Committed by Jim Harris
Browse files

vhost: return proper rc on vhost_dev_register() alloc failure



This must've been overlooked in patch 601bcbcf.

Fixes: 601bcbcf ("util: extend cpumask to hold more than 64 cpus")
Change-Id: Ia7e06fcacba5cd99770b81542678550e9fbc3ca2
Signed-off-by: default avatarDariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/399455


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 32ad027b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {