]> git.ipfire.org Git - thirdparty/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 Tokarev <mjt@tls.msk.ru>
Wed, 13 Dec 2023 15:51:00 +0000 (18:51 +0300)
commit5c9f4645313abf7d442cd038f9b9a5859612fb3e
treea7c4c9d5e1d15494e5b238ba5748dbfe9d60bc8b
parented7e167699912cb60c2127a2d4417f8cb2fa79ca
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>
(cherry picked from commit 20bc50137f3add52eb4788b420d717de27fed14b)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/acpi/erst.c