aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/stm32f405_soc.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/arm/stm32f405_soc.c')
-rw-r--r--hw/arm/stm32f405_soc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/arm/stm32f405_soc.c b/hw/arm/stm32f405_soc.c
index 07ce323a64..ddc680bfe0 100644
--- a/hw/arm/stm32f405_soc.c
+++ b/hw/arm/stm32f405_soc.c
@@ -160,10 +160,9 @@ static void stm32f405_soc_realize(DeviceState *dev_soc, Error **errp)
}
/* ADC device, the IRQs are ORed together */
- object_initialize_child_with_props(OBJECT(s), "adc-orirq", &s->adc_irqs,
- sizeof(s->adc_irqs), TYPE_OR_IRQ, &err,
- NULL);
- if (err != NULL) {
+ if (!object_initialize_child_with_props(OBJECT(s), "adc-orirq",
+ &s->adc_irqs, sizeof(s->adc_irqs),
+ TYPE_OR_IRQ, &err, NULL)) {
error_propagate(errp, err);
return;
}