xemu/hw/misc/macio
Markus Armbruster 2726dc51e0 hw: Fix error API violation around object_property_set_link()
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.

virtio_gpu_pci_base_realize(), virtio_vga_base_realize(),
sparc32_ledma_device_realize(), sparc32_dma_realize(),
sparc32_dma_realize() xilinx_axidma_realize(), mips_cps_realize(),
macio_realize_ide(), xilinx_enet_realize(), and
virtio_iommu_pci_realize() are wrong that way: they reuse the argument
they pass to object_property_set_link() for another call.

Harmless, because object_property_set_link() can't actually fail for
them: it fails when the property doesn't exist, is not settable, or
its .check() method fails.  Fix by passing &error_abort instead.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Cc: Alistair Francis <alistair@alistair23.me>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm@nongnu.org
Cc: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>
Cc: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20200630090351.1247703-16-armbru@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2020-07-02 06:25:29 +02:00
..
cuda.c cuda: add adb_autopoll_block() and adb_autopoll_unblock() functions 2020-06-26 10:13:52 +01:00
gpio.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
Kconfig kconfig: introduce kconfig files 2019-03-07 21:45:53 +01:00
mac_dbdma.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
macio.c hw: Fix error API violation around object_property_set_link() 2020-07-02 06:25:29 +02:00
Makefile.objs mac_newworld: add PMU device 2018-06-16 16:32:33 +10:00
pmu.c pmu: add adb_autopoll_block() and adb_autopoll_unblock() functions 2020-06-26 10:13:52 +01:00
trace-events trace-events: Delete unused trace points 2019-03-22 16:18:07 +00:00