From: Philippe Mathieu-Daudé Date: Fri, 13 Aug 2021 11:26:06 +0000 (+0200) Subject: hw/core: Add missing return on error X-Git-Tag: v6.1.0-rc4~6^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0b46318170bf2782564e1c444e01a47cda308c7f;p=thirdparty%2Fqemu.git hw/core: Add missing return on error If dies is not supported by this machine's CPU topology, don't keep processing options and return directly. Fixes: 0aebebb561c ("machine: reject -smp dies!=1 for non-PC machines") Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210813112608.1452541-2-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- diff --git a/hw/core/machine.c b/hw/core/machine.c index 943974d411c..abaeda589b7 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -752,6 +752,7 @@ static void smp_parse(MachineState *ms, SMPConfiguration *config, Error **errp) if (config->has_dies && config->dies != 0 && config->dies != 1) { error_setg(errp, "dies not supported by this machine's CPU topology"); + return; } /* compute missing values, prefer sockets over cores over threads */