diff options
author | Dinghao Liu <[email protected]> | 2020-05-24 06:31:32 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <[email protected]> | 2020-07-04 12:26:09 +0200 |
commit | 831b8755fd2f60cf00cbf854c2a2eccb03f2060b (patch) | |
tree | 3f09342d7cb320feae41bce9b20aa8e9473908ec | |
parent | e0eb34810113dbbf1ace57440cf48d514312a373 (diff) |
media: venus: venc: Fix runtime PM imbalance in venc_open
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 <[email protected]>
Signed-off-by: Stanimir Varbanov <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
-rw-r--r-- | drivers/media/platform/qcom/venus/venc.c | 3 |
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; } |