qemu-e2k/hw/misc
Markus Armbruster 65cd9064e1 qom: Clean up fragile use of error_is_set() in set() methods
Using error_is_set(ERRP) to find out whether a function failed is
either wrong, fragile, or unnecessarily opaque.  It's wrong when ERRP
may be null, because errors go undetected when it is.  It's fragile
when proving ERRP non-null involves a non-local argument.  Else, it's
unnecessarily opaque (see commit 84d18f0).

I guess the error_is_set(errp) in the ObjectProperty set() methods are
merely fragile right now, because I can't find a call chain that
passes a null errp argument.

Make the code more robust and more obviously correct: receive the
error in a local variable, then propagate it through the parameter.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-05-05 19:08:49 +02:00
..
macio
a9scu.c
applesmc.c qdev: Remove hex8/32/64 property types 2014-02-14 21:12:04 +01:00
arm11scu.c arm11mpcore: Split off SCU device 2013-11-05 17:47:30 +01:00
arm_integrator_debug.c
arm_l2x0.c sysbus: Set cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
arm_sysctl.c hw/misc/arm_sysctl: Fix bad boundary check on mb clock accesses 2014-02-26 17:19:57 +00:00
cbus.c
debugexit.c qdev: Remove hex8/32/64 property types 2014-02-14 21:12:04 +01:00
eccmemctl.c qdev: Remove hex8/32/64 property types 2014-02-14 21:12:04 +01:00
exynos4210_pmu.c exynos4210: Use macro ARRAY_SIZE where possible 2013-12-23 16:02:19 +04:00
imx_ccm.c
ivshmem.c qerror.h: Remove QERR defines that are only used once 2014-04-25 09:19:59 -04:00
lm32_sys.c lm32_sys: dump cpu state if test case fails 2014-02-04 19:47:39 +01:00
Makefile.objs pcmcia: QOM'ify PCMCIACardState and MicroDriveState 2013-11-05 18:06:52 +01:00
max111x.c misc/max111x: QOM casting sweep 2014-03-12 20:13:02 +01:00
milkymist-hpdmc.c
milkymist-pfpu.c
mst_fpga.c
omap_clk.c
omap_gpmc.c
omap_l4.c
omap_sdrc.c
omap_tap.c
pc-testdev.c
pci-testdev.c
puv3_pm.c
pvpanic.c pc: get rid of builtin pvpanic for "-M pc-1.5" 2013-11-21 17:38:54 +01:00
sga.c
slavio_misc.c
tmp105.c qom: Clean up fragile use of error_is_set() in set() methods 2014-05-05 19:08:49 +02:00
tmp105.h
vfio.c vfio: Cosmetic error reporting fixes 2014-03-25 12:08:52 -06:00
vmport.c isa: Clean up use of cannot_instantiate_with_device_add_yet 2013-12-23 00:27:23 +01:00
zynq_slcr.c misc: zynq_slcr: Make DB_PRINTs always compile 2014-04-17 21:34:07 +01:00