aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/spapr_vio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/spapr_vio.c b/hw/spapr_vio.c
index 25cfc9d912..b7b3ddd116 100644
--- a/hw/spapr_vio.c
+++ b/hw/spapr_vio.c
@@ -66,11 +66,11 @@ VIOsPAPRDevice *spapr_vio_find_by_reg(VIOsPAPRBus *bus, uint32_t reg)
QTAILQ_FOREACH(qdev, &bus->bus.children, sibling) {
dev = (VIOsPAPRDevice *)qdev;
if (dev->reg == reg) {
- break;
+ return dev;
}
}
- return dev;
+ return NULL;
}
#ifdef CONFIG_FDT