summary refs log tree commit diff stats
path: root/hw/pci/pci-hotplug-old.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/pci/pci-hotplug-old.c')
-rw-r--r--hw/pci/pci-hotplug-old.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/pci/pci-hotplug-old.c b/hw/pci/pci-hotplug-old.c
index 8dbc3c1cab..cf2caebfb1 100644
--- a/hw/pci/pci-hotplug-old.c
+++ b/hw/pci/pci-hotplug-old.c
@@ -90,7 +90,7 @@ static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon,
     qemu_opt_set(opts, "type", "nic");
 
     ret = net_client_init(opts, 0, &local_err);
-    if (error_is_set(&local_err)) {
+    if (local_err) {
         qerror_report_err(local_err);
         error_free(local_err);
         return NULL;
@@ -322,7 +322,7 @@ static int pci_device_hot_remove(Monitor *mon, const char *pci_addr)
     }
 
     qdev_unplug(&d->qdev, &local_err);
-    if (error_is_set(&local_err)) {
+    if (local_err) {
         monitor_printf(mon, "%s\n", error_get_pretty(local_err));
         error_free(local_err);
         return -1;