serial: serial_hds_isa_init() shouldn't fail
It shouldn't fail, and no caller checks for failure. Make failure fatal. Maintainers of affected machines cc'ed. Cc: Richard Henderson <rth@twiddle.net> Cc: Anthony Liguori <aliguori@amazon.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Leon Alrae <leon.alrae@imgtec.com> Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
b6607a1a20
commit
c6f10a5876
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user