aboutsummaryrefslogtreecommitdiff
path: root/hw/bt-hci.c
diff options
context:
space:
mode:
authorBibo Mao <maobibo@loongson.cn>2025-03-20 11:21:58 +0800
committerMarkus Armbruster <armbru@redhat.com>2025-03-20 07:58:19 +0100
commita725bc970e3091499be8be52798c21259f91b2cd (patch)
treeacd8506f8d4c781ed76314012ab71d491ee79440 /hw/bt-hci.c
parentdaf78a9d51402e8f70d89f86a8c5f12d02aee667 (diff)
downloadqemu-a725bc970e3091499be8be52798c21259f91b2cd.zip
qemu-a725bc970e3091499be8be52798c21259f91b2cd.tar.gz
qemu-a725bc970e3091499be8be52798c21259f91b2cd.tar.bz2
target/loongarch: Clean up virt_cpu_irq_init() error handling
The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call. virt_cpu_irq_init() is wrong that way: it passes &err to hotplug_handler_plug() twice. If both calls failed, this could trip error_setv()'s assertion. Moreover, if just one fails, the Error object leaks. Fortunately, these calls can't actually fail. Messed up in commit 50ebc3fc47f7 (hw/intc/loongarch_ipi: Notify ipi object when cpu is plugged) and commit 087a23a87c57 (hw/intc/loongarch_extioi: Use cpu plug notification). Clean this up by passing &error_abort instead. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Acked-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20250320032158.1762751-7-maobibo@loongson.cn> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'hw/bt-hci.c')
0 files changed, 0 insertions, 0 deletions