hw/intc: Check @errp to handle the error of IOAPICCommonClass.realize()
authorZhao Liu <zhao1.liu@intel.com>
Fri, 23 Feb 2024 08:56:53 +0000 (16:56 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 12 Mar 2024 21:56:55 +0000 (17:56 -0400)
commit0f9c30350bdf9d062609a15124f30f6c2b0a4b60
tree3bb1fa48d3fde19806b550f05a697e4786a5c050
parentccd1fd0c5d4f4cba7fa8642ab466a82db3e9f093
hw/intc: Check @errp to handle the error of IOAPICCommonClass.realize()

IOAPICCommonClass implements its own private realize(), and this private
realize() allows error.

Since IOAPICCommonClass.realize() returns void, to check the error,
dereference @errp with ERRP_GUARD().

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20240223085653.1255438-8-zhao1.liu@linux.intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/intc/ioapic_common.c