diff options
Diffstat (limited to 'drivers/virtio')
-rw-r--r-- | drivers/virtio/virtio_pci.c | 3 | ||||
-rw-r--r-- | drivers/virtio/virtio_ring.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 95896f387927..ef8d9d558fc7 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c | |||
@@ -636,6 +636,9 @@ static int __devinit virtio_pci_probe(struct pci_dev *pci_dev, | |||
636 | INIT_LIST_HEAD(&vp_dev->virtqueues); | 636 | INIT_LIST_HEAD(&vp_dev->virtqueues); |
637 | spin_lock_init(&vp_dev->lock); | 637 | spin_lock_init(&vp_dev->lock); |
638 | 638 | ||
639 | /* Disable MSI/MSIX to bring device to a known good state. */ | ||
640 | pci_msi_off(pci_dev); | ||
641 | |||
639 | /* enable the device */ | 642 | /* enable the device */ |
640 | err = pci_enable_device(pci_dev); | 643 | err = pci_enable_device(pci_dev); |
641 | if (err) | 644 | if (err) |
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 1ca88908723b..afe7e21dd0ae 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c | |||
@@ -119,7 +119,7 @@ static int vring_add_indirect(struct vring_virtqueue *vq, | |||
119 | 119 | ||
120 | desc = kmalloc((out + in) * sizeof(struct vring_desc), gfp); | 120 | desc = kmalloc((out + in) * sizeof(struct vring_desc), gfp); |
121 | if (!desc) | 121 | if (!desc) |
122 | return vq->vring.num; | 122 | return -ENOMEM; |
123 | 123 | ||
124 | /* Transfer entries from the sg list into the indirect page */ | 124 | /* Transfer entries from the sg list into the indirect page */ |
125 | for (i = 0; i < out; i++) { | 125 | for (i = 0; i < out; i++) { |