diff --git a/hw/char/serial.c b/hw/char/serial.c index 605b0d02f992cab219ca88d5de01daf30be0f980..6de6c297791a0e38347cd0ea15a80f4d72f79259 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -260,7 +260,7 @@ static void serial_xmit(SerialState *s) if (s->mcr & UART_MCR_LOOP) { /* in loopback mode, say that we just received a char */ serial_receive1(s, &s->tsr, 1); - } else if (qemu_chr_fe_write(&s->chr, &s->tsr, 1) != 1 && + } else if (qemu_chr_fe_write(&s->chr, &s->tsr, 1) == 0 && s->tsr_retry < MAX_XMIT_RETRY) { assert(s->watch_tag == 0); s->watch_tag =