diff options
author | Arjan van de Ven | 2008-07-26 04:45:41 +0200 |
---|---|---|
committer | Linus Torvalds | 2008-07-26 21:00:07 +0200 |
commit | 99fcd77d15357e8ba51005c25cc750b9c28b2688 (patch) | |
tree | 403293819dc7bcd854c50d8c486a1fdbbf9711a2 /fs/sysfs/group.c | |
parent | Use WARN() in fs/ (diff) | |
download | kernel-qcow2-linux-99fcd77d15357e8ba51005c25cc750b9c28b2688.tar.gz kernel-qcow2-linux-99fcd77d15357e8ba51005c25cc750b9c28b2688.tar.xz kernel-qcow2-linux-99fcd77d15357e8ba51005c25cc750b9c28b2688.zip |
Use WARN() in fs/sysfs
Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes
part of the warning section for better reporting/collection. Also, with this,
one fo the if() sections collapses entirely into the WARN().
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/sysfs/group.c')
-rw-r--r-- | fs/sysfs/group.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c index eeba38417b1d..fe611949a7f7 100644 --- a/fs/sysfs/group.c +++ b/fs/sysfs/group.c @@ -134,9 +134,8 @@ void sysfs_remove_group(struct kobject * kobj, if (grp->name) { sd = sysfs_get_dirent(dir_sd, grp->name); if (!sd) { - printk(KERN_WARNING "sysfs group %p not found for " + WARN(!sd, KERN_WARNING "sysfs group %p not found for " "kobject '%s'\n", grp, kobject_name(kobj)); - WARN_ON(!sd); return; } } else |