Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233936
b: refs/heads/master
c: d7a62cd
h: refs/heads/master
v: v3
  • Loading branch information
Amit Shah authored and Linus Torvalds committed Mar 6, 2011
1 parent ba0eea1 commit 6dd4fdc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fb62c00a6d8942775abc23d1621db1252e2d93d1
refs/heads/master: d7a62cd0332115d4c7c4689abea0d889a30d8349
8 changes: 8 additions & 0 deletions trunk/drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,10 @@ static void discard_port_data(struct port *port)
unsigned int len;
int ret;

if (!port->portdev) {
/* Device has been unplugged. vqs are already gone. */
return;
}
vq = port->in_vq;
if (port->inbuf)
buf = port->inbuf;
Expand Down Expand Up @@ -470,6 +474,10 @@ static void reclaim_consumed_buffers(struct port *port)
void *buf;
unsigned int len;

if (!port->portdev) {
/* Device has been unplugged. vqs are already gone. */
return;
}
while ((buf = virtqueue_get_buf(port->out_vq, &len))) {
kfree(buf);
port->outvq_full = false;
Expand Down

0 comments on commit 6dd4fdc

Please sign in to comment.