hw/acpi: Fix legacy CPU plug error API violations
authorMarkus Armbruster <armbru@redhat.com>
Wed, 4 Dec 2019 09:36:13 +0000 (10:36 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Wed, 18 Dec 2019 07:36:15 +0000 (08:36 +0100)
commit49e3e11f8f27a75070062965c097e3feacc5d029
treecbca11f291f57589924e87f445ffcb8a06a463a4
parent56e477a56399c4e6d7fc0f6227fd9c475f83a8ce
hw/acpi: Fix legacy CPU plug error API violations

legacy_acpi_cpu_plug_cb() dereferences @errp when
acpi_set_cpu_present_bit() fails.  That's wrong; see the big comment
in error.h.  Introduced in commit cc43364de7 "acpi/cpu-hotplug:
introduce helper function to keep bit setting in one place".

No caller actually passes null, and acpi_set_cpu_present_bit() can't
actually fail.

Fix anyway: drop acpi_set_cpu_present_bit()'s @errp parameter.

Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20191204093625.14836-7-armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
hw/acpi/cpu_hotplug.c