mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
PM / devfreq: mediatek: unlock on error in mtk_ccifreq_target()
Call mutex_unlock(&drv->reg_lock) before returning the error code.
Link: https://lore.kernel.org/all/1bada9b2-d276-4123-bfdf-03d165569543@moroto.mountain/
Fixes: d280560198
("PM / devfreq: mediatek: protect oop in critical session")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
This commit is contained in:
parent
e50fa1a5ac
commit
6c29e29e4d
@ -146,7 +146,8 @@ static int mtk_ccifreq_target(struct device *dev, unsigned long *freq,
|
||||
opp = devfreq_recommended_opp(dev, &opp_rate, 1);
|
||||
if (IS_ERR(opp)) {
|
||||
dev_err(dev, "failed to find opp for freq: %ld\n", opp_rate);
|
||||
return PTR_ERR(opp);
|
||||
ret = PTR_ERR(opp);
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
voltage = dev_pm_opp_get_voltage(opp);
|
||||
|
Loading…
Reference in New Issue
Block a user