]> git.proxmox.com Git - mirror_qemu.git/commit
hw/acpi/erst: Do not ignore Error* in realize handler
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 20 Nov 2023 13:00:17 +0000 (14:00 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Sat, 2 Dec 2023 20:56:49 +0000 (15:56 -0500)
commit20bc50137f3add52eb4788b420d717de27fed14b
treea9265c24df2e5a663b4375fb61298db88852826c
parent714a1415d7a69174e1640fcdd6eaae180fe438aa
hw/acpi/erst: Do not ignore Error* in realize handler

erst_realizefn() passes @errp to functions without checking for
failure.  If it runs into another failure, it trips error_setv()'s
assertion.

Use the ERRP_GUARD() macro and check *errp, as suggested in commit
ae7c80a7bd ("error: New macro ERRP_GUARD()").

Cc: qemu-stable@nongnu.org
Fixes: f7e26ffa59 ("ACPI ERST: support for ACPI ERST feature")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20231120130017.81286-1-philmd@linaro.org>
Reviewed-by: Ani Sinha <anisinha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/acpi/erst.c