as suggested by Andreas Signed-off-by: liguang <lig.f...@cn.fujitsu.com> --- hw/i386/pc.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c index b881314..b0454eb 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -503,6 +503,11 @@ static void port92_realizefn(DeviceState *dev, Error **err) ISADevice *isadev = ISA_DEVICE(dev); Port92State *s = PORT92(dev); + if (s->a20_out == NULL) { + error_setg(err, "Can't create port92 device.\n"); + return; + } + memory_region_init_io(&s->io, &port92_ops, s, "port92", 1); isa_register_ioport(isadev, &s->io, 0x92); -- 1.7.2.5