summary refs log tree commit diff stats
path: root/hw/sd/sdhci-pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/sd/sdhci-pci.c')
-rw-r--r--hw/sd/sdhci-pci.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/sd/sdhci-pci.c b/hw/sd/sdhci-pci.c
index 4f5977d487..c737c8b930 100644
--- a/hw/sd/sdhci-pci.c
+++ b/hw/sd/sdhci-pci.c
@@ -29,13 +29,12 @@ static Property sdhci_pci_properties[] = {
 
 static void sdhci_pci_realize(PCIDevice *dev, Error **errp)
 {
+    ERRP_GUARD();
     SDHCIState *s = PCI_SDHCI(dev);
-    Error *local_err = NULL;
 
     sdhci_initfn(s);
-    sdhci_common_realize(s, &local_err);
-    if (local_err) {
-        error_propagate(errp, local_err);
+    sdhci_common_realize(s, errp);
+    if (*errp) {
         return;
     }