Skip to content

Commit 6c29e29

Browse files
Dan Carpenterchanwoochoi
authored andcommitted
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: d280560 ("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>
1 parent e50fa1a commit 6c29e29

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/devfreq/mtk-cci-devfreq.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ static int mtk_ccifreq_target(struct device *dev, unsigned long *freq,
146146
opp = devfreq_recommended_opp(dev, &opp_rate, 1);
147147
if (IS_ERR(opp)) {
148148
dev_err(dev, "failed to find opp for freq: %ld\n", opp_rate);
149-
return PTR_ERR(opp);
149+
ret = PTR_ERR(opp);
150+
goto out_unlock;
150151
}
151152

152153
voltage = dev_pm_opp_get_voltage(opp);

0 commit comments

Comments
 (0)