Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105818
b: refs/heads/master
c: d955c78
h: refs/heads/master
v: v3
  • Loading branch information
Arjan van de Ven authored and Linus Torvalds committed Jul 25, 2008
1 parent 34fd604 commit 66270a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7a2c477069fbd32f91598f05334003979b987a39
refs/heads/master: d955c78ac4699ac9c3fe07be62982cda13d13267
9 changes: 3 additions & 6 deletions trunk/lib/kobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 66270a7

Please sign in to comment.