PM / devfreq: mediatek: unlock on error in mtk_ccifreq_target()
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 12 Oct 2023 09:41:12 +0000 (12:41 +0300)
committerChanwoo Choi <cw00.choi@samsung.com>
Tue, 17 Oct 2023 08:54:01 +0000 (17:54 +0900)
commit6c29e29e4d7f29348a9e051ad5bdb833c5a1bbb6
treeb76bd949a5eff0637c08c30c39418d80ab64e32d
parente50fa1a5ac52e2a2ec09b8028bdb1c4bf9166cbc
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>
drivers/devfreq/mtk-cci-devfreq.c