aboutsummaryrefslogtreecommitdiff
path: root/hw/sd/aspeed_sdhci.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/sd/aspeed_sdhci.c')
-rw-r--r--hw/sd/aspeed_sdhci.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/sd/aspeed_sdhci.c b/hw/sd/aspeed_sdhci.c
index 29aa11df66..687b300773 100644
--- a/hw/sd/aspeed_sdhci.c
+++ b/hw/sd/aspeed_sdhci.c
@@ -132,15 +132,13 @@ static void aspeed_sdhci_realize(DeviceState *dev, Error **errp)
Object *sdhci_slot = OBJECT(&sdhci->slots[i]);
SysBusDevice *sbd_slot = SYS_BUS_DEVICE(&sdhci->slots[i]);
- object_property_set_int(sdhci_slot, "sd-spec-version", 2, &err);
- if (err) {
+ if (!object_property_set_int(sdhci_slot, "sd-spec-version", 2, &err)) {
error_propagate(errp, err);
return;
}
- object_property_set_uint(sdhci_slot, "capareg",
- ASPEED_SDHCI_CAPABILITIES, &err);
- if (err) {
+ if (!object_property_set_uint(sdhci_slot, "capareg",
+ ASPEED_SDHCI_CAPABILITIES, &err)) {
error_propagate(errp, err);
return;
}