diff options
-rw-r--r-- | hw/char/spapr_vty.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c index 1d53035cbe..2d532afc55 100644 --- a/hw/char/spapr_vty.c +++ b/hw/char/spapr_vty.c @@ -228,6 +228,10 @@ VIOsPAPRDevice *vty_lookup(sPAPRMachineState *spapr, target_ulong reg) return spapr_vty_get_default(spapr->vio_bus); } + if (!object_dynamic_cast(OBJECT(sdev), TYPE_VIO_SPAPR_VTY_DEVICE)) { + return NULL; + } + return sdev; } |