aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/misc/mic/bus/vop_bus.c6
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
136static void vop_release_dev(struct device *d) 136static 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
141struct vop_device * 143struct 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;
176free_vdev: 178free_vdev:
177 kfree(vdev); 179 put_device(&vdev->dev);
178 return ERR_PTR(ret); 180 return ERR_PTR(ret);
179} 181}
180EXPORT_SYMBOL_GPL(vop_register_device); 182EXPORT_SYMBOL_GPL(vop_register_device);