aboutsummaryrefslogtreecommitdiff
path: root/hw/riscv/sifive_e.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/riscv/sifive_e.c')
-rw-r--r--hw/riscv/sifive_e.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/riscv/sifive_e.c b/hw/riscv/sifive_e.c
index 0cb66ac4e2..1b2e95a977 100644
--- a/hw/riscv/sifive_e.c
+++ b/hw/riscv/sifive_e.c
@@ -221,8 +221,7 @@ static void sifive_e_soc_realize(DeviceState *dev, Error **errp)
/* GPIO */
- sysbus_realize(SYS_BUS_DEVICE(&s->gpio), &err);
- if (err) {
+ if (!sysbus_realize(SYS_BUS_DEVICE(&s->gpio), &err)) {
error_propagate(errp, err);
return;
}