summaryrefslogtreecommitdiff
path: root/hw/arm/aspeed_ast2600.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/arm/aspeed_ast2600.c')
-rw-r--r--hw/arm/aspeed_ast2600.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c
index e6e2cf0737..22cbe68449 100644
--- a/hw/arm/aspeed_ast2600.c
+++ b/hw/arm/aspeed_ast2600.c
@@ -356,9 +356,8 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
/* FMC, The number of CS is set at the board level */
object_property_set_link(OBJECT(&s->fmc), "dram", OBJECT(s->dram_mr),
&error_abort);
- object_property_set_int(OBJECT(&s->fmc), "sdram-base",
- sc->memmap[ASPEED_SDRAM], &err);
- if (err) {
+ if (!object_property_set_int(OBJECT(&s->fmc), "sdram-base",
+ sc->memmap[ASPEED_SDRAM], &err)) {
error_propagate(errp, err);
return;
}