]> git.proxmox.com Git - mirror_qemu.git/commit - hw/gpio/omap_gpio.c
omap: Don't use hw_error() in device init() methods
authorMarkus Armbruster <armbru@redhat.com>
Thu, 17 Dec 2015 16:35:10 +0000 (17:35 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Wed, 13 Jan 2016 10:58:58 +0000 (11:58 +0100)
commit84a3a53cf61ef691478bd91afa455c801696053c
tree72425d317b2f9c0ca660ad73d84568695c7bf743
parentc525436e69bb7e74ca96982a40b8ead037186049
omap: Don't use hw_error() in device init() methods

Device init() methods aren't supposed to call hw_error(), they should
report the error and fail cleanly.  Do that.

The errors are all device misconfiguration.  All callers use
qdev_init_nofail(), so this patch merely converts hw_error() crashes
into &error_abort crashes.  Improvement, because now it crashes closer
to where the misconfiguration bug would be, and a few more bad
examples of hw_error() use are gone.

Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <1450370121-5768-3-git-send-email-armbru@redhat.com>
hw/gpio/omap_gpio.c
hw/i2c/omap_i2c.c
hw/intc/omap_intc.c