qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 2/2] hw/i386/pc: check a20_out in port92_realizef


From: liguang
Subject: [Qemu-devel] [PATCH v2 2/2] hw/i386/pc: check a20_out in port92_realizefn
Date: Thu, 28 Mar 2013 17:03:02 +0800

as suggested by Andreas

Signed-off-by: liguang <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]