projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[powerpc.git]
/
lib
/
kobject.c
diff --git
a/lib/kobject.c
b/lib/kobject.c
index
c2917ff
..
057921c
100644
(file)
--- a/
lib/kobject.c
+++ b/
lib/kobject.c
@@
-97,11
+97,12
@@
static void fill_kobj_path(struct kobject *kobj, char *path, int length)
}
/**
}
/**
- * kobject_get_path - generate and return the path associated with a given kobj
- * and kset pair. The result must be freed by the caller with kfree().
+ * kobject_get_path - generate and return the path associated with a given kobj and kset pair.
*
* @kobj: kobject in question, with which to build the path
* @gfp_mask: the allocation type used to allocate the path
*
* @kobj: kobject in question, with which to build the path
* @gfp_mask: the allocation type used to allocate the path
+ *
+ * The result must be freed by the caller with kfree().
*/
char *kobject_get_path(struct kobject *kobj, gfp_t gfp_mask)
{
*/
char *kobject_get_path(struct kobject *kobj, gfp_t gfp_mask)
{
@@
-170,7
+171,7
@@
int kobject_shadow_add(struct kobject * kobj, struct dentry *shadow_parent)
return -ENOENT;
if (!kobj->k_name)
kobj->k_name = kobj->name;
return -ENOENT;
if (!kobj->k_name)
kobj->k_name = kobj->name;
- if (!kobj->k_name) {
+ if (!
*
kobj->k_name) {
pr_debug("kobject attempted to be registered with no name!\n");
WARN_ON(1);
return -EINVAL;
pr_debug("kobject attempted to be registered with no name!\n");
WARN_ON(1);
return -EINVAL;
@@
-325,6
+326,7
@@
int kobject_rename(struct kobject * kobj, const char *new_name)
/**
* kobject_rename - change the name of an object
* @kobj: object in question.
/**
* kobject_rename - change the name of an object
* @kobj: object in question.
+ * @new_parent: object's new parent
* @new_name: object's new name
*/
* @new_name: object's new name
*/
@@
-383,9
+385,11
@@
int kobject_move(struct kobject *kobj, struct kobject *new_parent)
goto out;
old_parent = kobj->parent;
kobj->parent = new_parent;
goto out;
old_parent = kobj->parent;
kobj->parent = new_parent;
+ new_parent = NULL;
kobject_put(old_parent);
kobject_uevent_env(kobj, KOBJ_MOVE, envp);
out:
kobject_put(old_parent);
kobject_uevent_env(kobj, KOBJ_MOVE, envp);
out:
+ kobject_put(new_parent);
kobject_put(kobj);
kfree(devpath_string);
kfree(devpath);
kobject_put(kobj);
kfree(devpath_string);
kfree(devpath);