diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-04-19 12:17:29 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-04-19 12:17:29 -0400 |
commit | adf6d34e460387ee3e8f1e1875d52bff51212c7d (patch) | |
tree | 88ef100143e6184103a608f82dfd232bf6376eaf /drivers/base/driver.c | |
parent | d1964dab60ce7c104dd21590e987a8787db18051 (diff) | |
parent | 3760d31f11bfbd0ead9eaeb8573e0602437a9d7c (diff) |
Merge branch 'omap2-upstream' into devel
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 | ||