mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
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>
This commit is contained in:
parent
3d558330ad
commit
6c37ebf330
3 changed files with 11 additions and 19 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue