Messages in this thread | | | Date | Wed, 15 May 2013 14:22:28 -0700 | From | Tejun Heo <> | Subject | Re: [PATCH] kernel/workqueue.c: need call device_remove_file() when failure occurs after called device_create_file() |
| |
On Wed, May 15, 2013 at 02:13:14PM +0800, Chen Gang wrote: > > In workqueue_sysfs_register(), when failure occurs after called > device_create_file(), need call device_remove_file() to release the > related resources, then call device_unregister(). > > Or it will cause issue. > > For individual 'device_attributs' (just like our case), need call > device_remove_file() explictly and then call device_unregister(), > please reference drivers/base/*.c (e.g node.c or cpu.c).
Hmm... isn't this already taken care of by __sysfs_remove_dir() which device_unregister() calls? That function removes all non-directory files under the directory being removed.
Thanks.
-- tejun
| |