Skip to content

Commit

Permalink
virtio: clean up handling of request_irq failure
Browse files Browse the repository at this point in the history
We call del_vqs twice when request_irq fails, this
makes no sense.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  • Loading branch information
Michael S. Tsirkin committed Dec 15, 2016
1 parent f83f12d commit d417959
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/virtio/virtio_pci_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit d417959

Please sign in to comment.