diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2014-12-04 13:20:27 -0500 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2014-12-09 09:32:32 -0500 |
commit | 5c609a5ef05d98e26778824ba84581fe5e400db6 (patch) | |
tree | 487da89e8ad7ef9d3bcb485ae877518f1669e18b /drivers/lguest | |
parent | ce15408f350c4b97635618692a45aedabfdd2696 (diff) |
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/lguest')
-rw-r--r-- | drivers/lguest/lguest_device.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c index 9b77b6623ff8..89088d6538fd 100644 --- a/drivers/lguest/lguest_device.c +++ b/drivers/lguest/lguest_device.c | |||
@@ -126,7 +126,7 @@ static void status_notify(struct virtio_device *vdev) | |||
126 | * sorted out, this routine is called so we can tell the Host which features we | 126 | * sorted out, this routine is called so we can tell the Host which features we |
127 | * understand and accept. | 127 | * understand and accept. |
128 | */ | 128 | */ |
129 | static void lg_finalize_features(struct virtio_device *vdev) | 129 | static int lg_finalize_features(struct virtio_device *vdev) |
130 | { | 130 | { |
131 | unsigned int i, bits; | 131 | unsigned int i, bits; |
132 | struct lguest_device_desc *desc = to_lgdev(vdev)->desc; | 132 | struct lguest_device_desc *desc = to_lgdev(vdev)->desc; |
@@ -153,6 +153,8 @@ static void lg_finalize_features(struct virtio_device *vdev) | |||
153 | 153 | ||
154 | /* Tell Host we've finished with this device's feature negotiation */ | 154 | /* Tell Host we've finished with this device's feature negotiation */ |
155 | status_notify(vdev); | 155 | status_notify(vdev); |
156 | |||
157 | return 0; | ||
156 | } | 158 | } |
157 | 159 | ||
158 | /* Once they've found a field, getting a copy of it is easy. */ | 160 | /* Once they've found a field, getting a copy of it is easy. */ |