aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDinghao Liu <dinghao.liu@zju.edu.cn>2020-05-24 12:31:32 +0800
committerStanimir Varbanov <stanimir.varbanov@linaro.org>2020-06-27 13:03:15 +0300
commitb5b7e04c25debbb3ed976e158d39844037238610 (patch)
tree9ecdf7a79ba929125d42ae5d3f0bc5aaf2a61d7a
parent374361c1c8452504dbc81b7adc40821c966e7bb7 (diff)
media: venus: venc: Fix runtime PM imbalance in venc_openvenus-tag-for-v5.9venus-for-next-v5.9
pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
-rw-r--r--drivers/media/platform/qcom/venus/venc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index feed648550d1..513bbc07f7bc 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -1177,7 +1177,7 @@ static int venc_open(struct file *file)
ret = pm_runtime_get_sync(core->dev_enc);
if (ret < 0)
- goto err_free_inst;
+ goto err_put_sync;
ret = venc_ctrl_init(inst);
if (ret)
@@ -1222,7 +1222,6 @@ err_ctrl_deinit:
venc_ctrl_deinit(inst);
err_put_sync:
pm_runtime_put_sync(core->dev_enc);
-err_free_inst:
kfree(inst);
return ret;
}

Privacy Policy