aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/driver.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2008-04-01 00:22:26 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-04-01 00:22:26 -0400
commit399f486286f44d55c4fff0e9cc5d712f2b443489 (patch)
tree0c2820b3e04232eaa96f08c1057b87728fb3e7a4 /drivers/base/driver.c
parent481419ec9fbdf3f4ec5389c7e91a81b4a7ebee8d (diff)
parenta9edadbf790d72adf6ebed476cb5caf7743e7e4a (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'drivers/base/driver.c')
-rw-r--r--drivers/base/driver.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index bf31a0170a48..9a6537f14401 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -133,6 +133,7 @@ int driver_add_kobj(struct device_driver *drv, struct kobject *kobj,
133{ 133{
134 va_list args; 134 va_list args;
135 char *name; 135 char *name;
136 int ret;
136 137
137 va_start(args, fmt); 138 va_start(args, fmt);
138 name = kvasprintf(GFP_KERNEL, fmt, args); 139 name = kvasprintf(GFP_KERNEL, fmt, args);
@@ -141,7 +142,9 @@ int driver_add_kobj(struct device_driver *drv, struct kobject *kobj,
141 if (!name) 142 if (!name)
142 return -ENOMEM; 143 return -ENOMEM;
143 144
144 return kobject_add(kobj, &drv->p->kobj, "%s", name); 145 ret = kobject_add(kobj, &drv->p->kobj, "%s", name);
146 kfree(name);
147 return ret;
145} 148}
146EXPORT_SYMBOL_GPL(driver_add_kobj); 149EXPORT_SYMBOL_GPL(driver_add_kobj);
147 150