projects
/
platform
/
upstream
/
kernel-adaptation-pc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5739411
)
Driver core: Fix cleanup in device_create_vargs().
author
Cornelia Huck
<cornelia.huck@de.ibm.com>
Wed, 3 Sep 2008 16:26:41 +0000
(18:26 +0200)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Thu, 16 Oct 2008 16:24:49 +0000
(09:24 -0700)
If device_register() in device_create_vargs() fails, the device
must be cleaned up with put_device() (which is also fine on NULL)
instead of kfree().
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/core.c
patch
|
blob
|
history
diff --git
a/drivers/base/core.c
b/drivers/base/core.c
index
aac91e8
..
9649d1c
100644
(file)
--- a/
drivers/base/core.c
+++ b/
drivers/base/core.c
@@
-1256,7
+1256,7
@@
struct device *device_create_vargs(struct class *class, struct device *parent,
return dev;
error:
-
kfre
e(dev);
+
put_devic
e(dev);
return ERR_PTR(retval);
}
EXPORT_SYMBOL_GPL(device_create_vargs);