projects
/
profile
/
ivi
/
kernel-x86-ivi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4026227
)
vme: add missing put_device() after device_register() fails
author
Emilio G. Cota
<cota@braap.org>
Wed, 13 Feb 2013 18:47:54 +0000
(13:47 -0500)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 14 Feb 2013 17:24:14 +0000
(09:24 -0800)
put_device() must be called after device_register() fails,
since device_register() always initializes the refcount
on the device structure.
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vme/vme.c
patch
|
blob
|
history
diff --git
a/drivers/vme/vme.c
b/drivers/vme/vme.c
index
95a9f71
..
5e6c7d7
100644
(file)
--- a/
drivers/vme/vme.c
+++ b/
drivers/vme/vme.c
@@
-1376,6
+1376,7
@@
static int __vme_register_driver_bus(struct vme_driver *drv,
return 0;
err_reg:
+ put_device(&vdev->dev);
kfree(vdev);
err_devalloc:
list_for_each_entry_safe(vdev, tmp, &drv->devices, drv_list) {