diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2014-12-04 20:20:27 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2014-12-09 16:32:32 +0200 |
commit | 5c609a5ef05d98e26778824ba84581fe5e400db6 (patch) | |
tree | 487da89e8ad7ef9d3bcb485ae877518f1669e18b /drivers/virtio/virtio_pci.c | |
parent | ce15408f350c4b97635618692a45aedabfdd2696 (diff) | |
download | talos-obmc-linux-5c609a5ef05d98e26778824ba84581fe5e400db6.tar.gz talos-obmc-linux-5c609a5ef05d98e26778824ba84581fe5e400db6.zip |
virtio: allow finalize_features to fail
This will make it easy for transports to validate features and return
failure.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/virtio/virtio_pci.c')
-rw-r--r-- | drivers/virtio/virtio_pci.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index dd6df979862b..9be59d9f2f19 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -112,7 +112,7 @@ static u64 vp_get_features(struct virtio_device *vdev) } /* virtio config->finalize_features() implementation */ -static void vp_finalize_features(struct virtio_device *vdev) +static int vp_finalize_features(struct virtio_device *vdev) { struct virtio_pci_device *vp_dev = to_vp_device(vdev); @@ -124,6 +124,8 @@ static void vp_finalize_features(struct virtio_device *vdev) /* We only support 32 feature bits. */ iowrite32(vdev->features, vp_dev->ioaddr + VIRTIO_PCI_GUEST_FEATURES); + + return 0; } /* virtio config->get() implementation */ |