ChangeSet 1.2449.2.7, 2004/11/04 10:55:28-08:00, tj@home-tj.org [PATCH] driver-model: kobject_add() error path reference counting fix df_04_kobject_add_ref_fix.patch In kobject_add(), @kobj wasn't put'd properly on error path. This patch fixes it. Signed-off-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman lib/kobject.c | 1 + 1 files changed, 1 insertion(+) diff -Nru a/lib/kobject.c b/lib/kobject.c --- a/lib/kobject.c 2004-11-04 16:30:32 -08:00 +++ b/lib/kobject.c 2004-11-04 16:30:32 -08:00 @@ -183,6 +183,7 @@ unlink(kobj); if (parent) kobject_put(parent); + kobject_put(kobj); } else { kobject_hotplug(kobj, KOBJ_ADD); }