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>
This commit is contained in:
committed by
Linus Torvalds
parent
12e0036818
commit
f810a5cf28
@ -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 = {
|
||||
|
Reference in New Issue
Block a user