aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-serial-bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/virtio-serial-bus.c')
-rw-r--r--hw/virtio-serial-bus.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index 3a09f0d3c6..6befd4d139 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -335,6 +335,11 @@ static void handle_output(VirtIODevice *vdev, VirtQueue *vq)
goto next_buf;
}
+ if (!port->host_connected) {
+ ret = 0;
+ goto next_buf;
+ }
+
/*
* A port may not have any handler registered for consuming the
* data that the guest sends or it may not have a chardev associated