Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87911
b: refs/heads/master
c: d478376
h: refs/heads/master
i:
  87909: 9d7bdbf
  87907: 2d1a90a
  87903: 6362216
v: v3
  • Loading branch information
Jesper Juhl authored and Linus Torvalds committed Mar 28, 2008
1 parent e60bfbf commit 7fe0151
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 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: 4cdc1d1fa5c5ac14dc21be19832f02fd0b83867e
refs/heads/master: d478376cb0dc9ab16a2b6e02fd8cd1174e724c64
5 changes: 4 additions & 1 deletion trunk/drivers/base/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ int driver_add_kobj(struct device_driver *drv, struct kobject *kobj,
{
va_list args;
char *name;
int ret;

va_start(args, fmt);
name = kvasprintf(GFP_KERNEL, fmt, args);
Expand All @@ -141,7 +142,9 @@ int driver_add_kobj(struct device_driver *drv, struct kobject *kobj,
if (!name)
return -ENOMEM;

return kobject_add(kobj, &drv->p->kobj, "%s", name);
ret = kobject_add(kobj, &drv->p->kobj, "%s", name);
kfree(name);
return ret;
}
EXPORT_SYMBOL_GPL(driver_add_kobj);

Expand Down

0 comments on commit 7fe0151

Please sign in to comment.