Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211643
b: refs/heads/master
c: 96eb872
h: refs/heads/master
i:
  211641: 1d22aec
  211639: ad7ff58
v: v3
  • Loading branch information
Amit Shah authored and Rusty Russell committed Oct 21, 2010
1 parent e8d53f7 commit da64643
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 02238959944ce031f066f21e541a14933aca6575
refs/heads/master: 96eb872b2a041b1536ccc6ae2fa87eb28f6e2bb2
15 changes: 9 additions & 6 deletions trunk/drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -1600,8 +1600,6 @@ static void virtcons_remove(struct virtio_device *vdev)
{
struct ports_device *portdev;
struct port *port, *port2;
struct port_buffer *buf;
unsigned int len;

portdev = vdev->priv;

Expand All @@ -1615,11 +1613,16 @@ static void virtcons_remove(struct virtio_device *vdev)

unregister_chrdev(portdev->chr_major, "virtio-portsdev");

while ((buf = virtqueue_get_buf(portdev->c_ivq, &len)))
free_buf(buf);
if (use_multiport(portdev)) {
struct port_buffer *buf;
unsigned int len;

while ((buf = virtqueue_detach_unused_buf(portdev->c_ivq)))
free_buf(buf);
while ((buf = virtqueue_get_buf(portdev->c_ivq, &len)))
free_buf(buf);

while ((buf = virtqueue_detach_unused_buf(portdev->c_ivq)))
free_buf(buf);
}

vdev->config->del_vqs(vdev);
kfree(portdev->in_vqs);
Expand Down

0 comments on commit da64643

Please sign in to comment.