diff options
-rw-r--r-- | hw/dma/xilinx_axidma.c | 4 | ||||
-rw-r--r-- | hw/net/xilinx_axienet.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c index 6065689ad1..3987b5ff96 100644 --- a/hw/dma/xilinx_axidma.c +++ b/hw/dma/xilinx_axidma.c @@ -554,9 +554,7 @@ static void xilinx_axidma_realize(DeviceState *dev, Error **errp) return; xilinx_axidma_realize_fail: - if (!*errp) { - *errp = local_err; - } + error_propagate(errp, local_err); } static void xilinx_axidma_init(Object *obj) diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c index b6701844d3..5ffa739f68 100644 --- a/hw/net/xilinx_axienet.c +++ b/hw/net/xilinx_axienet.c @@ -981,9 +981,7 @@ static void xilinx_enet_realize(DeviceState *dev, Error **errp) return; xilinx_enet_realize_fail: - if (!*errp) { - *errp = local_err; - } + error_propagate(errp, local_err); } static void xilinx_enet_init(Object *obj) |