This series is inspired of Peter Maydell fix [1]: "hw/arm/xlnx-zynqmp.c: fix some error-handling code", but grew after v1 [2] review :/
Markus: I added the cocci patches to your Error section, I hope that's fine :) Part 3: Use &error_abort/&error_fatal in instance_init(). Regards, Phil. [1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg691636.html [2] https://www.mail-archive.com/qemu-devel@nongnu.org/msg692155.html Based-on: <20200412224144.12205-1-f4...@amsat.org> Philippe Mathieu-Daudé (7): scripts/coccinelle: Use &error_abort in TypeInfo::instance_init() various: Use &error_abort in instance_init() scripts/coccinelle: Find eventually missing error_propagate() calls migration/colo: Add missing error-propagation code hw/mips/boston: Add missing error-propagation code hw/mips/mips_malta: Use &error_abort in MachineClass::init -> create_cps qga/commands-win32: Add missing error-propagation code .../find-missing-error_propagate.cocci | 53 +++++++++++++++++++ .../use-error_abort-in-instance_init.cocci | 45 ++++++++++++++++ backends/cryptodev-vhost-user.c | 2 +- backends/rng-egd.c | 2 +- backends/rng-random.c | 2 +- backends/vhost-user.c | 3 +- hw/arm/bcm2835_peripherals.c | 6 ++- hw/arm/vexpress.c | 8 +-- hw/arm/xlnx-zcu102.c | 8 +-- hw/block/fdc.c | 4 +- hw/block/vhost-user-blk.c | 2 +- hw/block/virtio-blk.c | 2 +- hw/core/machine.c | 6 +-- hw/cpu/core.c | 4 +- hw/display/vga-pci.c | 7 ++- hw/display/xlnx_dp.c | 4 +- hw/dma/sparc32_dma.c | 2 +- hw/gpio/aspeed_gpio.c | 2 +- hw/ide/macio.c | 4 +- hw/ide/qdev.c | 4 +- hw/intc/apic_common.c | 2 +- hw/mem/nvdimm.c | 4 +- hw/mips/boston.c | 17 +++--- hw/mips/mips_malta.c | 15 ++---- hw/misc/aspeed_sdmc.c | 2 +- hw/misc/edu.c | 3 +- hw/misc/macio/macio.c | 4 +- hw/misc/macio/pmu.c | 3 +- hw/misc/pca9552.c | 2 +- hw/misc/tmp105.c | 2 +- hw/misc/tmp421.c | 8 +-- hw/net/e1000.c | 3 +- hw/net/lance.c | 3 +- hw/net/lasi_i82596.c | 3 +- hw/net/ne2000-isa.c | 4 +- hw/net/spapr_llan.c | 3 +- hw/net/virtio-net.c | 2 +- hw/pci-host/grackle.c | 2 +- hw/pci-host/i440fx.c | 8 +-- hw/pci-host/prep.c | 2 +- hw/pci-host/q35.c | 23 ++++---- hw/pci-host/sabre.c | 3 +- hw/pci-host/uninorth.c | 9 ++-- hw/pcmcia/pxa2xx.c | 3 +- hw/ppc/spapr_drc.c | 6 +-- hw/ppc/spapr_rng.c | 2 +- hw/riscv/sifive_u.c | 4 +- hw/s390x/event-facility.c | 6 +-- hw/s390x/s390-ccw.c | 2 +- hw/s390x/s390-skeys.c | 4 +- hw/s390x/s390-stattrib.c | 4 +- hw/s390x/sclp.c | 2 +- hw/scsi/scsi-bus.c | 2 +- hw/ssi/xilinx_spips.c | 2 +- hw/usb/bus.c | 4 +- hw/usb/dev-network.c | 2 +- hw/usb/dev-storage.c | 4 +- hw/usb/host-libusb.c | 2 +- hw/usb/redirect.c | 2 +- hw/virtio/virtio-balloon.c | 4 +- migration/colo.c | 3 ++ net/dump.c | 4 +- net/filter-buffer.c | 2 +- net/filter-mirror.c | 10 ++-- net/filter-rewriter.c | 3 +- qga/commands-win32.c | 26 ++++++--- target/arm/cpu64.c | 4 +- target/i386/cpu.c | 23 ++++---- target/s390x/cpu.c | 3 +- tests/check-qom-proplist.c | 7 +-- tests/test-qdev-global-props.c | 5 +- MAINTAINERS | 2 + 72 files changed, 289 insertions(+), 155 deletions(-) create mode 100644 scripts/coccinelle/find-missing-error_propagate.cocci create mode 100644 scripts/coccinelle/use-error_abort-in-instance_init.cocci -- 2.21.1