aboutsummaryrefslogtreecommitdiff
path: root/hw/arm
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-05-10 20:08:42 +0100
committerPeter Maydell <peter.maydell@linaro.org>2021-05-25 16:01:43 +0100
commit32962103523838faf15c070bff0fc75dfd2f42c8 (patch)
tree4958dfb21e979b2577d1510b3f9629a12548621a /hw/arm
parent4eb1770988397354ed95dec2bd63c09348ebf707 (diff)
downloadqemu-32962103523838faf15c070bff0fc75dfd2f42c8.zip
qemu-32962103523838faf15c070bff0fc75dfd2f42c8.tar.gz
qemu-32962103523838faf15c070bff0fc75dfd2f42c8.tar.bz2
hw/arm/armsse: Convert armsse_realize() to use ERRP_GUARD
Convert armsse_realize() to use ERRP_GUARD(), following the rules in include/qapi/error.h. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210510190844.17799-5-peter.maydell@linaro.org
Diffstat (limited to 'hw/arm')
-rw-r--r--hw/arm/armsse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c
index 1729f09..be5aa1f 100644
--- a/hw/arm/armsse.c
+++ b/hw/arm/armsse.c
@@ -913,7 +913,6 @@ static void armsse_realize(DeviceState *dev, Error **errp)
const ARMSSEDeviceInfo *devinfo;
int i;
MemoryRegion *mr;
- Error *err = NULL;
SysBusDevice *sbd_apb_ppc0;
SysBusDevice *sbd_secctl;
DeviceState *dev_apb_ppc0;
@@ -922,6 +921,8 @@ 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;
@@ -1151,10 +1152,9 @@ static void armsse_realize(DeviceState *dev, Error **errp)
uint32_t sram_bank_size = 1 << s->sram_addr_width;
memory_region_init_ram(&s->sram[i], NULL, ramname,
- sram_bank_size, &err);
+ sram_bank_size, errp);
g_free(ramname);
- if (err) {
- error_propagate(errp, err);
+ if (*errp) {
return;
}
object_property_set_link(OBJECT(&s->mpc[i]), "downstream",