summaryrefslogtreecommitdiffstats
path: root/drivers/s390/kvm/virtio_ccw.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2014-12-04 19:20:27 +0100
committerMichael S. Tsirkin <mst@redhat.com>2014-12-09 15:32:32 +0100
commit5c609a5ef05d98e26778824ba84581fe5e400db6 (patch)
tree487da89e8ad7ef9d3bcb485ae877518f1669e18b /drivers/s390/kvm/virtio_ccw.c
parentvirtio_ccw: legacy: don't negotiate rev 1/features (diff)
downloadlinux-5c609a5ef05d98e26778824ba84581fe5e400db6.tar.xz
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/s390/kvm/virtio_ccw.c')
-rw-r--r--drivers/s390/kvm/virtio_ccw.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/s390/kvm/virtio_ccw.c b/drivers/s390/kvm/virtio_ccw.c
index c792b5fe0bc9..789275fb577f 100644
--- a/drivers/s390/kvm/virtio_ccw.c
+++ b/drivers/s390/kvm/virtio_ccw.c
@@ -752,7 +752,7 @@ out_free:
return rc;
}
-static void virtio_ccw_finalize_features(struct virtio_device *vdev)
+static int virtio_ccw_finalize_features(struct virtio_device *vdev)
{
struct virtio_ccw_device *vcdev = to_vc_device(vdev);
struct virtio_feature_desc *features;
@@ -760,7 +760,7 @@ static void virtio_ccw_finalize_features(struct virtio_device *vdev)
ccw = kzalloc(sizeof(*ccw), GFP_DMA | GFP_KERNEL);
if (!ccw)
- return;
+ return 0;
features = kzalloc(sizeof(*features), GFP_DMA | GFP_KERNEL);
if (!features)
@@ -793,6 +793,8 @@ static void virtio_ccw_finalize_features(struct virtio_device *vdev)
out_free:
kfree(features);
kfree(ccw);
+
+ return 0;
}
static void virtio_ccw_get_config(struct virtio_device *vdev,