]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/char/virtio_console.c
virtio: console: Unblock poll on port hot-unplug
[mv-sheeva.git] / drivers / char / virtio_console.c
index 92f1f65d57a923c338d117f036af30f0af054963..47b710ca4ab3320d1c4b7bea9fdb1af33df48984 100644 (file)
@@ -663,6 +663,10 @@ static unsigned int port_fops_poll(struct file *filp, poll_table *wait)
        port = filp->private_data;
        poll_wait(filp, &port->waitqueue, wait);
 
+       if (!port->guest_connected) {
+               /* Port got unplugged */
+               return POLLHUP;
+       }
        ret = 0;
        if (!will_read_block(port))
                ret |= POLLIN | POLLRDNORM;