mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
thermal: clock_cooling: Fix missing mutex_init()
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>
This commit is contained in:
parent
f4c592439b
commit
165989a5b6
1 changed files with 1 additions and 0 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue