From: Victor Lira <victorm.l...@amd.com> Rule 17.7: "The value returned by a function having non-void return type shall be used"
This patch fixes this by adding a check to the return value. No functional changes. Signed-off-by: Victor Lira <victorm.l...@amd.com> --- Cc: George Dunlap <george.dun...@citrix.com> Cc: Dario Faggioli <dfaggi...@suse.com> Cc: Juergen Gross <jgr...@suse.com> Cc: xen-devel@lists.xenproject.org --- xen/common/sched/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c index d84b65f197..e1cd824622 100644 --- a/xen/common/sched/core.c +++ b/xen/common/sched/core.c @@ -2789,7 +2789,10 @@ static int cpu_schedule_up(unsigned int cpu) BUG_ON(cpu >= NR_CPUS); if ( idle_vcpu[cpu] == NULL ) - vcpu_create(idle_vcpu[0]->domain, cpu); + { + if ( vcpu_create(idle_vcpu[0]->domain, cpu) == NULL ) + return -ENOMEM; + } else idle_vcpu[cpu]->sched_unit->res = sr; -- 2.37.6