diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-04-01 00:22:26 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-04-01 00:22:26 -0400 |
commit | 399f486286f44d55c4fff0e9cc5d712f2b443489 (patch) | |
tree | 0c2820b3e04232eaa96f08c1057b87728fb3e7a4 /drivers/base/driver.c | |
parent | 481419ec9fbdf3f4ec5389c7e91a81b4a7ebee8d (diff) | |
parent | a9edadbf790d72adf6ebed476cb5caf7743e7e4a (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.c | 5 |
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 | } |
146 | EXPORT_SYMBOL_GPL(driver_add_kobj); | 149 | EXPORT_SYMBOL_GPL(driver_add_kobj); |
147 | 150 | ||