From 66270a793456b199ee1136bbb984794d13c9fafd Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Fri, 25 Jul 2008 01:45:55 -0700 Subject: [PATCH] --- yaml --- r: 105818 b: refs/heads/master c: d955c78ac4699ac9c3fe07be62982cda13d13267 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/lib/kobject.c | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index f5aef062d47a..3dbce528bbf2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7a2c477069fbd32f91598f05334003979b987a39 +refs/heads/master: d955c78ac4699ac9c3fe07be62982cda13d13267 diff --git a/trunk/lib/kobject.c b/trunk/lib/kobject.c index 744401571ed7..bd732ffebc85 100644 --- a/trunk/lib/kobject.c +++ b/trunk/lib/kobject.c @@ -164,9 +164,8 @@ static int kobject_add_internal(struct kobject *kobj) return -ENOENT; if (!kobj->name || !kobj->name[0]) { - pr_debug("kobject: (%p): attempted to be registered with empty " + WARN(1, "kobject: (%p): attempted to be registered with empty " "name!\n", kobj); - WARN_ON(1); return -EINVAL; } @@ -583,12 +582,10 @@ static void kobject_release(struct kref *kref) void kobject_put(struct kobject *kobj) { if (kobj) { - if (!kobj->state_initialized) { - printk(KERN_WARNING "kobject: '%s' (%p): is not " + if (!kobj->state_initialized) + WARN(1, KERN_WARNING "kobject: '%s' (%p): is not " "initialized, yet kobject_put() is being " "called.\n", kobject_name(kobj), kobj); - WARN_ON(1); - } kref_put(&kobj->kref, kobject_release); } }