From fa394ed625731c18f904578903718bf16617fe92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Sat, 22 Oct 2016 12:52:59 +0300 Subject: char: make some qemu_chr_fe skip if no driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In most cases, front ends do not care about the side effect of CharBackend, so we can simply skip the checks and call the qemu_chr_fe functions even without associated CharDriver. Signed-off-by: Marc-André Lureau Message-Id: <20161022095318.17775-20-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- hw/char/escc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'hw/char/escc.c') diff --git a/hw/char/escc.c b/hw/char/escc.c index 4578a46f10..c71b0a8e56 100644 --- a/hw/char/escc.c +++ b/hw/char/escc.c @@ -599,9 +599,7 @@ static uint64_t escc_mem_read(void *opaque, hwaddr addr, else ret = s->rx; trace_escc_mem_readb_data(CHN_C(s), ret); - if (s->chr.chr) { - qemu_chr_fe_accept_input(&s->chr); - } + qemu_chr_fe_accept_input(&s->chr); return ret; default: break; -- cgit v1.2.3