projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4c5924
)
thermal: clock_cooling: Fix missing mutex_init()
author
Wei Yongjun
<weiyj.lk@gmail.com>
Mon, 25 Jul 2016 07:01:19 +0000
(07:01 +0000)
committer
Zhang Rui
<rui.zhang@intel.com>
Mon, 8 Aug 2016 02:57:39 +0000
(10:57 +0800)
The driver allocates the mutex but not initialize it.
Use mutex_init() on it to initialize it correctly.
This is detected by Coccinelle semantic patch.
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/clock_cooling.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/thermal/clock_cooling.c
b/drivers/thermal/clock_cooling.c
index 1b4ff0f4c7168f578253d248507cb57fc02245c2..ed5dd0e8865746fe928f08459218779b97227103 100644
(file)
--- a/
drivers/thermal/clock_cooling.c
+++ b/
drivers/thermal/clock_cooling.c
@@
-426,6
+426,7
@@
clock_cooling_register(struct device *dev, const char *clock_name)
if (!ccdev)
return ERR_PTR(-ENOMEM);
+ mutex_init(&ccdev->lock);
ccdev->dev = dev;
ccdev->clk = devm_clk_get(dev, clock_name);
if (IS_ERR(ccdev->clk))