Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: d2805601988f ("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>

authored by

Dan Carpenter and committed by
Chanwoo Choi
6c29e29e e50fa1a5

+2 -1
+2 -1
drivers/devfreq/mtk-cci-devfreq.c
··· 146 146 opp = devfreq_recommended_opp(dev, &opp_rate, 1); 147 147 if (IS_ERR(opp)) { 148 148 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; 150 151 } 151 152 152 153 voltage = dev_pm_opp_get_voltage(opp);