virtio: fix error handling for debug builds
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 3 Aug 2016 04:18:51 +0000 (07:18 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 9 Aug 2016 10:42:35 +0000 (13:42 +0300)
On error, virtqueue_add calls START_USE but not
END_USE. Thankfully that's normally empty anyway,
but might not be when debugging. Fix it up.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/virtio/virtio_ring.c

index 5ed228ddadba0863b60214cfa8d1b57a0cfb47ab..e383ecdaca594ce0786c321af35ee59b1807007e 100644 (file)
@@ -428,6 +428,7 @@ unmap_release:
        if (indirect)
                kfree(desc);
 
+       END_USE(vq);
        return -EIO;
 }