projects
/
profile
/
ivi
/
kernel-adaptation-intel-automotive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
77b6706
)
ARM i.MX: fix error-valued pointer dereference in clk_register_gate2()
author
Wei Yongjun
<yongjun_wei@trendmicro.com.cn>
Thu, 25 Oct 2012 15:02:18 +0000
(23:02 +0800)
committer
Sascha Hauer
<s.hauer@pengutronix.de>
Fri, 16 Nov 2012 14:53:57 +0000
(15:53 +0100)
The error-valued pointer clk is used for the arg of kfree, it should be
kfree(gate) if clk_register() return ERR_PTR().
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
arch/arm/mach-imx/clk-gate2.c
patch
|
blob
|
history
diff --git
a/arch/arm/mach-imx/clk-gate2.c
b/arch/arm/mach-imx/clk-gate2.c
index
3c1b8ff
..
cc49c7a
100644
(file)
--- a/
arch/arm/mach-imx/clk-gate2.c
+++ b/
arch/arm/mach-imx/clk-gate2.c
@@
-112,7
+112,7
@@
struct clk *clk_register_gate2(struct device *dev, const char *name,
clk = clk_register(dev, &gate->hw);
if (IS_ERR(clk))
- kfree(
clk
);
+ kfree(
gate
);
return clk;
}