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 qom: Pass available size to object_initialize() 2013-08-30 21:15:44 +02:00
Makefile.objs pcmcia: QOM'ify PCMCIACardState and MicroDriveState 2013-11-05 18:06:52 +01:00
a9scu.c a9mpcore: Embed A9SCUState 2013-11-05 17:47:29 +01:00
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 integrator: fix Linux boot failure by emulating dbg region 2013-10-31 14:00:16 +01:00
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 arm: fix location of some include files 2013-04-15 15:16:01 +02:00
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 imx_ccm: QOM cast cleanup 2013-07-29 21:06:05 +02:00
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
max111x.c misc/max111x: QOM casting sweep 2014-03-12 20:13:02 +01:00
milkymist-hpdmc.c milkymist-hpdmc: QOM cast cleanup 2013-07-29 21:06:58 +02:00
milkymist-pfpu.c milkymist-pfpu: QOM cast cleanup 2013-07-29 21:06:58 +02:00
mst_fpga.c mst_fpga: QOM cast cleanup 2013-07-29 21:06:59 +02:00
omap_clk.c hw: move other devices to hw/misc/, configure with default-configs/ 2013-04-08 18:13:16 +02:00
omap_gpmc.c memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
omap_l4.c memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
omap_sdrc.c memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
omap_tap.c memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
pc-testdev.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
pci-testdev.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
puv3_pm.c puv3_pm: QOM cast cleanup 2013-07-29 21:06:59 +02:00
pvpanic.c pc: get rid of builtin pvpanic for "-M pc-1.5" 2013-11-21 17:38:54 +01:00
sga.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
slavio_misc.c slavio_misc: QOM cast cleanup for APCState 2013-07-29 21:06:59 +02:00
tmp105.c qom: Clean up fragile use of error_is_set() in set() methods 2014-05-05 19:08:49 +02:00
tmp105.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
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