summaryrefslogtreecommitdiff
path: root/drivers/virtio/virtio_pci_common.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2016-12-16 00:58:13 +0300
committerMichael S. Tsirkin <mst@redhat.com>2016-12-16 01:12:44 +0300
commitd41795978c47fa87b6514a0f2238958b7e8319a0 (patch)
tree7af93fccc37398b23d63f8bd05a2026d38086cd7 /drivers/virtio/virtio_pci_common.c
parentf83f12d660d11718d3eed9d979ee03e83aa55544 (diff)
downloadlinux-d41795978c47fa87b6514a0f2238958b7e8319a0.tar.xz
virtio: clean up handling of request_irq failure
We call del_vqs twice when request_irq fails, this makes no sense. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/virtio/virtio_pci_common.c')
-rw-r--r--drivers/virtio/virtio_pci_common.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
index d9a905827967..423f3d9c1548 100644
--- a/drivers/virtio/virtio_pci_common.c
+++ b/drivers/virtio/virtio_pci_common.c
@@ -360,10 +360,8 @@ static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nvqs,
vring_interrupt, 0,
vp_dev->msix_names[msix_vec],
vqs[i]);
- if (err) {
- vp_del_vq(vqs[i]);
+ if (err)
goto error_find;
- }
}
return 0;