summaryrefslogtreecommitdiffstats
path: root/drivers/base/core.c
diff options
context:
space:
mode:
authorArjan van de Ven2008-07-26 04:45:39 +0200
committerLinus Torvalds2008-07-26 21:00:07 +0200
commitf810a5cf28a818db96333cd23646f0227ec015b4 (patch)
tree671eb15b7557d7cc68ebfb30df73ef666638bdcf /drivers/base/core.c
parentUse WARN() in block/ (diff)
downloadkernel-qcow2-linux-f810a5cf28a818db96333cd23646f0227ec015b4.tar.gz
kernel-qcow2-linux-f810a5cf28a818db96333cd23646f0227ec015b4.tar.xz
kernel-qcow2-linux-f810a5cf28a818db96333cd23646f0227ec015b4.zip
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.c6
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 = {