lkml.org 
[lkml]   [2013]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2013-05-16 00:01    [W:2.178 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site