diff options
-rw-r--r-- | drivers/char/virtio_console.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index e3fb5296cf25..942a9826bd23 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c | |||
@@ -529,6 +529,10 @@ static bool will_write_block(struct port *port) | |||
529 | { | 529 | { |
530 | bool ret; | 530 | bool ret; |
531 | 531 | ||
532 | if (!port->guest_connected) { | ||
533 | /* Port got hot-unplugged. Let's exit. */ | ||
534 | return false; | ||
535 | } | ||
532 | if (!port->host_connected) | 536 | if (!port->host_connected) |
533 | return true; | 537 | return true; |
534 | 538 | ||