aboutsummaryrefslogtreecommitdiff
path: root/hw/arm
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2022-11-21 09:50:45 +0100
committerMarkus Armbruster <armbru@redhat.com>2022-12-14 16:19:35 +0100
commit6c37ebf3301ca449ebe449138b86e55762503250 (patch)
tree1b0e28279ef42b2cce3936f961618c7dc627b0b7 /hw/arm
parent3d558330adec7233da6c48c5e8584eb176fb77d7 (diff)
downloadqemu-6c37ebf3301ca449ebe449138b86e55762503250.zip
qemu-6c37ebf3301ca449ebe449138b86e55762503250.tar.gz
qemu-6c37ebf3301ca449ebe449138b86e55762503250.tar.bz2
error: Drop some obviously superfluous error_propagate()
When error_propagate(errp, local_err) is the only reader of @local_err, we can just as well change its writers to write @errp directly, and drop the error_propagate() along with @local_err. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20221121085054.683122-2-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'hw/arm')
-rw-r--r--hw/arm/virt.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index b871350..02d627a 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2771,24 +2771,20 @@ static void virt_dimm_unplug_request(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
VirtMachineState *vms = VIRT_MACHINE(hotplug_dev);
- Error *local_err = NULL;
if (!vms->acpi_dev) {
- error_setg(&local_err,
+ error_setg(errp,
"memory hotplug is not enabled: missing acpi-ged device");
- goto out;
+ return;
}
if (object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM)) {
- error_setg(&local_err,
- "nvdimm device hot unplug is not supported yet.");
- goto out;
+ error_setg(errp, "nvdimm device hot unplug is not supported yet.");
+ return;
}
hotplug_handler_unplug_request(HOTPLUG_HANDLER(vms->acpi_dev), dev,
- &local_err);
-out:
- error_propagate(errp, local_err);
+ errp);
}
static void virt_dimm_unplug(HotplugHandler *hotplug_dev,