summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-05-05 10:45:19 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-05-19 10:51:42 +0300
commitf6bf35ee3e4d9353c117bcc5cc4616d1ce2d977f (patch)
tree2c9a7fd87c3677f1b4951511478c2782380bc8c1 /drivers
parent09dfb36ce250e76322ac8940c10d75e53a9e48d4 (diff)
downloadlinux-f6bf35ee3e4d9353c117bcc5cc4616d1ce2d977f.tar.xz
media: venus: core: use pm_runtime_resume_and_get()
Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/platform/qcom/venus/pm_helpers.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c
index c7e1ebec47ee..d0fddf5e9a69 100644
--- a/drivers/media/platform/qcom/venus/pm_helpers.c
+++ b/drivers/media/platform/qcom/venus/pm_helpers.c
@@ -990,9 +990,8 @@ static int core_power_v4(struct venus_core *core, int on)
if (on == POWER_ON) {
if (pmctrl) {
- ret = pm_runtime_get_sync(pmctrl);
+ ret = pm_runtime_resume_and_get(pmctrl);
if (ret < 0) {
- pm_runtime_put_noidle(pmctrl);
return ret;
}
}