提交 ac0c14d7 编写于 作者: M Markus Armbruster 提交者: Kevin Wolf

virtio-pci: Check for virtio_blk_init() failure

It can't actually fail now, but the next commit will change that.

s390_virtio_blk_init() already checks for failure, but
virtio_blk_init_pci() doesn't.  Fix that.
Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 31f54f24
......@@ -551,6 +551,9 @@ static int virtio_blk_init_pci(PCIDevice *pci_dev)
return -1;
}
vdev = virtio_blk_init(&pci_dev->qdev, &proxy->block);
if (!vdev) {
return -1;
}
vdev->nvectors = proxy->nvectors;
virtio_init_pci(proxy, vdev,
PCI_VENDOR_ID_REDHAT_QUMRANET,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册