提交 4c62c595 编写于 作者: G Guennadi Liakhovetski 提交者: Paul Mundt

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: NGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 3f224f4e
...@@ -161,9 +161,11 @@ EXPORT_SYMBOL(clk_add_alias); ...@@ -161,9 +161,11 @@ EXPORT_SYMBOL(clk_add_alias);
*/ */
void clkdev_drop(struct clk_lookup *cl) void clkdev_drop(struct clk_lookup *cl)
{ {
struct clk_lookup_alloc *cla = container_of(cl, struct clk_lookup_alloc, cl);
mutex_lock(&clocks_mutex); mutex_lock(&clocks_mutex);
list_del(&cl->node); list_del(&cl->node);
mutex_unlock(&clocks_mutex); mutex_unlock(&clocks_mutex);
kfree(cl); kfree(cla);
} }
EXPORT_SYMBOL(clkdev_drop); EXPORT_SYMBOL(clkdev_drop);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册