diff options
Diffstat (limited to 'drivers/char/hw_random')
-rw-r--r-- | drivers/char/hw_random/core.c | 5 | ||||
-rw-r--r-- | drivers/char/hw_random/virtio-rng.c | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c index e989f67bb61f..3d9c61e5acbf 100644 --- a/drivers/char/hw_random/core.c +++ b/drivers/char/hw_random/core.c | |||
@@ -158,10 +158,11 @@ static ssize_t rng_dev_read(struct file *filp, char __user *buf, | |||
158 | goto out; | 158 | goto out; |
159 | } | 159 | } |
160 | } | 160 | } |
161 | out_unlock: | ||
162 | mutex_unlock(&rng_mutex); | ||
163 | out: | 161 | out: |
164 | return ret ? : err; | 162 | return ret ? : err; |
163 | out_unlock: | ||
164 | mutex_unlock(&rng_mutex); | ||
165 | goto out; | ||
165 | } | 166 | } |
166 | 167 | ||
167 | 168 | ||
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c index bdaef8e94021..64fe0a793efd 100644 --- a/drivers/char/hw_random/virtio-rng.c +++ b/drivers/char/hw_random/virtio-rng.c | |||
@@ -114,7 +114,7 @@ static struct virtio_device_id id_table[] = { | |||
114 | { 0 }, | 114 | { 0 }, |
115 | }; | 115 | }; |
116 | 116 | ||
117 | static struct virtio_driver virtio_rng = { | 117 | static struct virtio_driver virtio_rng_driver = { |
118 | .driver.name = KBUILD_MODNAME, | 118 | .driver.name = KBUILD_MODNAME, |
119 | .driver.owner = THIS_MODULE, | 119 | .driver.owner = THIS_MODULE, |
120 | .id_table = id_table, | 120 | .id_table = id_table, |
@@ -124,12 +124,12 @@ static struct virtio_driver virtio_rng = { | |||
124 | 124 | ||
125 | static int __init init(void) | 125 | static int __init init(void) |
126 | { | 126 | { |
127 | return register_virtio_driver(&virtio_rng); | 127 | return register_virtio_driver(&virtio_rng_driver); |
128 | } | 128 | } |
129 | 129 | ||
130 | static void __exit fini(void) | 130 | static void __exit fini(void) |
131 | { | 131 | { |
132 | unregister_virtio_driver(&virtio_rng); | 132 | unregister_virtio_driver(&virtio_rng_driver); |
133 | } | 133 | } |
134 | module_init(init); | 134 | module_init(init); |
135 | module_exit(fini); | 135 | module_exit(fini); |