diff options
-rw-r--r-- | drivers/misc/mic/bus/vop_bus.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/misc/mic/bus/vop_bus.c b/drivers/misc/mic/bus/vop_bus.c index fd7f2a6049f8..e5bb9c749b5d 100644 --- a/drivers/misc/mic/bus/vop_bus.c +++ b/drivers/misc/mic/bus/vop_bus.c | |||
@@ -135,7 +135,9 @@ EXPORT_SYMBOL_GPL(vop_unregister_driver); | |||
135 | 135 | ||
136 | static void vop_release_dev(struct device *d) | 136 | static void vop_release_dev(struct device *d) |
137 | { | 137 | { |
138 | put_device(d); | 138 | struct vop_device *dev = dev_to_vop(d); |
139 | |||
140 | kfree(dev); | ||
139 | } | 141 | } |
140 | 142 | ||
141 | struct vop_device * | 143 | struct vop_device * |
@@ -174,7 +176,7 @@ vop_register_device(struct device *pdev, int id, | |||
174 | goto free_vdev; | 176 | goto free_vdev; |
175 | return vdev; | 177 | return vdev; |
176 | free_vdev: | 178 | free_vdev: |
177 | kfree(vdev); | 179 | put_device(&vdev->dev); |
178 | return ERR_PTR(ret); | 180 | return ERR_PTR(ret); |
179 | } | 181 | } |
180 | EXPORT_SYMBOL_GPL(vop_register_device); | 182 | EXPORT_SYMBOL_GPL(vop_register_device); |