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/misc | |
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/misc')
-rw-r--r-- | drivers/misc/mic/card/mic_virtio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c index d027d299602f..e486a0c26267 100644 --- a/drivers/misc/mic/card/mic_virtio.c +++ b/drivers/misc/mic/card/mic_virtio.c | |||
@@ -84,7 +84,7 @@ static u64 mic_get_features(struct virtio_device *vdev) | |||
84 | return features; | 84 | return features; |
85 | } | 85 | } |
86 | 86 | ||
87 | static void mic_finalize_features(struct virtio_device *vdev) | 87 | static int mic_finalize_features(struct virtio_device *vdev) |
88 | { | 88 | { |
89 | unsigned int i, bits; | 89 | unsigned int i, bits; |
90 | struct mic_device_desc __iomem *desc = to_micvdev(vdev)->desc; | 90 | struct mic_device_desc __iomem *desc = to_micvdev(vdev)->desc; |
@@ -107,6 +107,8 @@ static void mic_finalize_features(struct virtio_device *vdev) | |||
107 | iowrite8(ioread8(&out_features[i / 8]) | (1 << (i % 8)), | 107 | iowrite8(ioread8(&out_features[i / 8]) | (1 << (i % 8)), |
108 | &out_features[i / 8]); | 108 | &out_features[i / 8]); |
109 | } | 109 | } |
110 | |||
111 | return 0; | ||
110 | } | 112 | } |
111 | 113 | ||
112 | /* | 114 | /* |