diff options
Diffstat (limited to 'drivers/char/hw_random/virtio-rng.c')
-rw-r--r-- | drivers/char/hw_random/virtio-rng.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c index 32216b623248..915157fcff98 100644 --- a/drivers/char/hw_random/virtio-rng.c +++ b/drivers/char/hw_random/virtio-rng.c | |||
@@ -51,7 +51,7 @@ static void register_buffer(void) | |||
51 | 51 | ||
52 | sg_init_one(&sg, random_data+data_left, RANDOM_DATA_SIZE-data_left); | 52 | sg_init_one(&sg, random_data+data_left, RANDOM_DATA_SIZE-data_left); |
53 | /* There should always be room for one buffer. */ | 53 | /* There should always be room for one buffer. */ |
54 | if (vq->vq_ops->add_buf(vq, &sg, 0, 1, random_data) != 0) | 54 | if (vq->vq_ops->add_buf(vq, &sg, 0, 1, random_data) < 0) |
55 | BUG(); | 55 | BUG(); |
56 | vq->vq_ops->kick(vq); | 56 | vq->vq_ops->kick(vq); |
57 | } | 57 | } |
@@ -116,7 +116,7 @@ static int virtrng_probe(struct virtio_device *vdev) | |||
116 | return 0; | 116 | return 0; |
117 | } | 117 | } |
118 | 118 | ||
119 | static void virtrng_remove(struct virtio_device *vdev) | 119 | static void __devexit virtrng_remove(struct virtio_device *vdev) |
120 | { | 120 | { |
121 | vdev->config->reset(vdev); | 121 | vdev->config->reset(vdev); |
122 | hwrng_unregister(&virtio_hwrng); | 122 | hwrng_unregister(&virtio_hwrng); |