diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2008-07-25 22:45:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-26 15:00:07 -0400 |
commit | 99fcd77d15357e8ba51005c25cc750b9c28b2688 (patch) | |
tree | 403293819dc7bcd854c50d8c486a1fdbbf9711a2 /fs/sysfs/file.c | |
parent | 5c752ad9f35910ff1912b3f3ae82878178ddc432 (diff) |
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/file.c')
-rw-r--r-- | fs/sysfs/file.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index 3f07893ff896..c9e4e5091da1 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c | |||
@@ -337,9 +337,8 @@ static int sysfs_open_file(struct inode *inode, struct file *file) | |||
337 | if (kobj->ktype && kobj->ktype->sysfs_ops) | 337 | if (kobj->ktype && kobj->ktype->sysfs_ops) |
338 | ops = kobj->ktype->sysfs_ops; | 338 | ops = kobj->ktype->sysfs_ops; |
339 | else { | 339 | else { |
340 | printk(KERN_ERR "missing sysfs attribute operations for " | 340 | WARN(1, KERN_ERR "missing sysfs attribute operations for " |
341 | "kobject: %s\n", kobject_name(kobj)); | 341 | "kobject: %s\n", kobject_name(kobj)); |
342 | WARN_ON(1); | ||
343 | goto err_out; | 342 | goto err_out; |
344 | } | 343 | } |
345 | 344 | ||