diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2008-07-26 06:45:39 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-26 23:00:07 +0400 |
commit | f810a5cf28a818db96333cd23646f0227ec015b4 (patch) | |
tree | 671eb15b7557d7cc68ebfb30df73ef666638bdcf /drivers/base/core.c | |
parent | 12e0036818eed243c8ed6583ebf98261a2554e12 (diff) | |
download | linux-f810a5cf28a818db96333cd23646f0227ec015b4.tar.xz |
Use WARN() in drivers/base/
Use WARN() instead of a printk+WARN_ON() pair; this way the message
becomes part of the warning section for better reporting/collection.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: Greg KH <greg@kroah.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r-- | drivers/base/core.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 7d5c63c81a59..068aa1c9538c 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -116,12 +116,10 @@ static void device_release(struct kobject *kobj) dev->type->release(dev); else if (dev->class && dev->class->dev_release) dev->class->dev_release(dev); - else { - printk(KERN_ERR "Device '%s' does not have a release() " + else + WARN(1, KERN_ERR "Device '%s' does not have a release() " "function, it is broken and must be fixed.\n", dev->bus_id); - WARN_ON(1); - } } static struct kobj_type device_ktype = { |