From: Cornelia Huck Date: Mon, 21 Jan 2008 15:09:44 +0000 (+0100) Subject: Driver core: Cleanup get_device_parent() in device_add() and device_move() X-Git-Tag: v2.6.25-rc1~1243^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63b6971a0876b744e2fcf3c9df15d130501e1deb;p=pandora-kernel.git Driver core: Cleanup get_device_parent() in device_add() and device_move() Make setup_parent() void as get_device_parent() will always return either a valid kobject or NULL. Introduce cleanup_glue_dir() to drop reference grabbed on "glue" directory by get_device_parent(). Use it for cleanup in device_move() and device_add() on errors. This should fix the refcounting problem reported in http://marc.info/?l=linux-kernel&m=120052487909200&w=2 Signed-off-by: Cornelia Huck Cc: Dave Young Cc: Gabor Gombas Cc: Tejun Heo Cc: Al Viro Cc: Marcel Holtmann Cc: David Miller Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed