qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PULL 08/10] serial: serial_hds_isa_init() shouldn't fail


From: Andreas Färber
Subject: [Qemu-devel] [PULL 08/10] serial: serial_hds_isa_init() shouldn't fail
Date: Tue, 24 Feb 2015 14:58:28 +0100

From: Markus Armbruster <address@hidden>

It shouldn't fail, and no caller checks for failure.  Make failure
fatal.

Maintainers of affected machines cc'ed.

Cc: Richard Henderson <address@hidden>
Cc: Anthony Liguori <address@hidden>
Cc: "Michael S. Tsirkin" <address@hidden>
Cc: Aurelien Jarno <address@hidden>
Cc: Leon Alrae <address@hidden>
Cc: Blue Swirl <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
---
 hw/char/serial-isa.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/hw/char/serial-isa.c b/hw/char/serial-isa.c
index 059ceb8..f3db024 100644
--- a/hw/char/serial-isa.c
+++ b/hw/char/serial-isa.c
@@ -119,22 +119,16 @@ static void serial_register_types(void)
 
 type_init(serial_register_types)
 
-static bool serial_isa_init(ISABus *bus, int index, CharDriverState *chr)
+static void serial_isa_init(ISABus *bus, int index, CharDriverState *chr)
 {
     DeviceState *dev;
     ISADevice *isadev;
 
-    isadev = isa_try_create(bus, TYPE_ISA_SERIAL);
-    if (!isadev) {
-        return false;
-    }
+    isadev = isa_create(bus, TYPE_ISA_SERIAL);
     dev = DEVICE(isadev);
     qdev_prop_set_uint32(dev, "index", index);
     qdev_prop_set_chr(dev, "chardev", chr);
-    if (qdev_init(dev) < 0) {
-        return false;
-    }
-    return true;
+    qdev_init_nofail(dev);
 }
 
 void serial_hds_isa_init(ISABus *bus, int n)
-- 
2.1.4




reply via email to

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