aboutsummaryrefslogtreecommitdiff
path: root/target-unicore32/helper.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-02-05 10:29:15 +0100
committerAndreas Färber <afaerber@suse.de>2015-03-10 17:07:27 +0100
commit6e8e26519901bc254a0db2e8aad805c4349cd3b4 (patch)
tree7d344612bcd31fcbf10291efce3be117866c75a0 /target-unicore32/helper.c
parentc08295d4bf161332f3f0b34b378138592a26245a (diff)
target-i386: Clean up misuse of qdev_init() in realize method
x86_cpu_apic_realize() calls qdev_init() to realize the APIC. qdev_init()'s error handling has unwanted side effects: it unparents the device, and it calls qerror_report_err(). qerror_report_err() is always inappropriate in realize methods, because it doesn't return the Error object. It either reports the error to stderr or the human monitor, or it stores it in the QMP monitor, where it makes the QMP command fail even though the realize method succeeded. Fortunately, qdev_init() can't actually fail here, because realize can't fail for any of the three possible APIC device models. Clean up by cutting out the qdev_init() middle-man: set property "realized" directly. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-unicore32/helper.c')
0 files changed, 0 insertions, 0 deletions