Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- hw/mips/mips_malta.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index af678f5784..8620e9c42c 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -1035,11 +1035,7 @@ void mips_malta_init(MachineState *machine) /* Make sure the first 3 serial ports are associated with a device. */ for(i = 0; i < 3; i++) { - if (!serial_hds[i]) { - char label[32]; - snprintf(label, sizeof(label), "serial%d", i); - serial_hds[i] = qemu_chr_new(label, "null"); - } + serial_hds[i] = serial_chr_nonnull(serial_hds[i]); } /* create CPU */ -- 2.14.1