summaryrefslogtreecommitdiff
path: root/drivers/virtio/virtio_mmio.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2014-12-04 21:20:27 +0300
committerMichael S. Tsirkin <mst@redhat.com>2014-12-09 17:32:32 +0300
commit5c609a5ef05d98e26778824ba84581fe5e400db6 (patch)
tree487da89e8ad7ef9d3bcb485ae877518f1669e18b /drivers/virtio/virtio_mmio.c
parentce15408f350c4b97635618692a45aedabfdd2696 (diff)
downloadlinux-5c609a5ef05d98e26778824ba84581fe5e400db6.tar.xz
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_mmio.c')
-rw-r--r--drivers/virtio/virtio_mmio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index aec1daee9ada..5219210d31ce 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -152,7 +152,7 @@ static u64 vm_get_features(struct virtio_device *vdev)
return readl(vm_dev->base + VIRTIO_MMIO_HOST_FEATURES);
}
-static void vm_finalize_features(struct virtio_device *vdev)
+static int vm_finalize_features(struct virtio_device *vdev)
{
struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
@@ -164,6 +164,8 @@ static void vm_finalize_features(struct virtio_device *vdev)
writel(0, vm_dev->base + VIRTIO_MMIO_GUEST_FEATURES_SEL);
writel(vdev->features, vm_dev->base + VIRTIO_MMIO_GUEST_FEATURES);
+
+ return 0;
}
static void vm_get(struct virtio_device *vdev, unsigned offset,