]> err.no Git - linux-2.6/blobdiff - lib/kobject.c
ACPI: IA64: fix allnoconfig build
[linux-2.6] / lib / kobject.c
index 93685f43bb9b31c39012f3d1362e01c235900027..057921c5945a551777f56706b397c5e4f737aaf3 100644 (file)
@@ -326,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.
+ *     @new_parent: object's new parent
  *     @new_name: object's new name
  */
 
@@ -384,9 +385,11 @@ int kobject_move(struct kobject *kobj, struct kobject *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(new_parent);
        kobject_put(kobj);
        kfree(devpath_string);
        kfree(devpath);