diff options
| author | Markus Armbruster <armbru@redhat.com> | 2022-11-21 09:50:47 +0100 |
|---|---|---|
| committer | Markus Armbruster <armbru@redhat.com> | 2022-12-14 16:19:35 +0100 |
| commit | 05e385d2a96325c1f26b874f1b832237229b8c1f (patch) | |
| tree | 3e17519074c633ebc1f2875b215677788e52e4ab /hw/arm/armsse.c | |
| parent | 740d6c4eba8bb44ea00550ccc97a4c49945ecc3c (diff) | |
| download | focaccia-qemu-05e385d2a96325c1f26b874f1b832237229b8c1f.tar.gz focaccia-qemu-05e385d2a96325c1f26b874f1b832237229b8c1f.zip | |
error: Move ERRP_GUARD() to the beginning of the function
include/qapi/error.h advises to put ERRP_GUARD() right at the beginning of the function, because only then can it guard the whole function. Clean up the few spots disregarding the advice. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20221121085054.683122-4-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'hw/arm/armsse.c')
| -rw-r--r-- | hw/arm/armsse.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c index aecdeb9815..0202bad787 100644 --- a/hw/arm/armsse.c +++ b/hw/arm/armsse.c @@ -900,6 +900,7 @@ static qemu_irq armsse_get_common_irq_in(ARMSSE *s, int irqno) static void armsse_realize(DeviceState *dev, Error **errp) { + ERRP_GUARD(); ARMSSE *s = ARM_SSE(dev); ARMSSEClass *asc = ARM_SSE_GET_CLASS(dev); const ARMSSEInfo *info = asc->info; @@ -914,8 +915,6 @@ static void armsse_realize(DeviceState *dev, Error **errp) DeviceState *dev_splitter; uint32_t addr_width_max; - ERRP_GUARD(); - if (!s->board_memory) { error_setg(errp, "memory property was not set"); return; |