summaryrefslogtreecommitdiffstats
path: root/drivers/virtio/virtio_input.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-10 01:28:09 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-10 01:28:09 +0200
commit5d44f4b3484e85c8d4527ecaca5e536da774ae21 (patch)
tree5c699fd097844ecdf30ef9b47444064d713ac410 /drivers/virtio/virtio_input.c
parenttoshiba laptop: replace ioremap_cache with ioremap (diff)
parentLinux 4.2-rc6 (diff)
downloadlinux-5d44f4b3484e85c8d4527ecaca5e536da774ae21.tar.xz
linux-5d44f4b3484e85c8d4527ecaca5e536da774ae21.zip
Merge 4.2-rc6 into char-misc-next
We want the fixes in Linus's tree in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/virtio/virtio_input.c')
-rw-r--r--drivers/virtio/virtio_input.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/virtio/virtio_input.c b/drivers/virtio/virtio_input.c
index 60e2a1677563..c96944b59856 100644
--- a/drivers/virtio/virtio_input.c
+++ b/drivers/virtio/virtio_input.c
@@ -313,6 +313,7 @@ err_init_vq:
static void virtinput_remove(struct virtio_device *vdev)
{
struct virtio_input *vi = vdev->priv;
+ void *buf;
unsigned long flags;
spin_lock_irqsave(&vi->lock, flags);
@@ -320,6 +321,9 @@ static void virtinput_remove(struct virtio_device *vdev)
spin_unlock_irqrestore(&vi->lock, flags);
input_unregister_device(vi->idev);
+ vdev->config->reset(vdev);
+ while ((buf = virtqueue_detach_unused_buf(vi->sts)) != NULL)
+ kfree(buf);
vdev->config->del_vqs(vdev);
kfree(vi);
}