diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2010-09-17 05:25:10 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-09-29 20:43:32 -0400 |
commit | 4c62c595c2a23fb36a0b901b550115370047a137 (patch) | |
tree | 534a2e47822d68f2b07b3b880c7f821760595d29 /arch/sh/kernel | |
parent | 3f224f4e057ce67713f3e7a8890f2fbe12d047a5 (diff) |
sh: fix a kfree address in clkdev code
kfree() in clkdev_drop() function should actually be called with an address of
a struct clk_lookup_alloc object, and not struct clk_lookup, as presently done.
This just happens to work, because "struct clk_lookup cl" is the first
member in struct clk_lookup_alloc.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/clkdev.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/sh/kernel/clkdev.c b/arch/sh/kernel/clkdev.c index befc255830a..1f800ef4a73 100644 --- a/arch/sh/kernel/clkdev.c +++ b/arch/sh/kernel/clkdev.c | |||
@@ -161,9 +161,11 @@ EXPORT_SYMBOL(clk_add_alias); | |||
161 | */ | 161 | */ |
162 | void clkdev_drop(struct clk_lookup *cl) | 162 | void clkdev_drop(struct clk_lookup *cl) |
163 | { | 163 | { |
164 | struct clk_lookup_alloc *cla = container_of(cl, struct clk_lookup_alloc, cl); | ||
165 | |||
164 | mutex_lock(&clocks_mutex); | 166 | mutex_lock(&clocks_mutex); |
165 | list_del(&cl->node); | 167 | list_del(&cl->node); |
166 | mutex_unlock(&clocks_mutex); | 168 | mutex_unlock(&clocks_mutex); |
167 | kfree(cl); | 169 | kfree(cla); |
168 | } | 170 | } |
169 | EXPORT_SYMBOL(clkdev_drop); | 171 | EXPORT_SYMBOL(clkdev_drop); |