[PATCH 04/13] media: venus: Discard pm_runtime_put_autosuspend() return values
From: Brian Norris
Date: Tue Oct 06 2026 - 19:22:12 EST
Propagating the pm_runtime_put_autosuspend() return value to callers is
not particularly useful.
Returning an error code from pm_runtime_put_autosuspend() merely means
that it has not queued up a timer or work item to check whether or not
the device can be suspended and there are many perfectly valid
situations in which that can happen, like after writing "on" to the
device's runtime PM "control" attribute in sysfs for one example.
Accordingly, update the Venus vdec and venc drivers to simply discard
the return value of pm_runtime_put_autosuspend().
This will facilitate a planned change of the
pm_runtime_put_autosuspend() return type to void in the future, similar
to commit 3afd8df02433 ("PM: runtime: Change pm_runtime_put() return
type to void").
Signed-off-by: Brian Norris <briannorris@xxxxxxxxxxxx>
---
This patch is independent of the rest of the series, except for the end
(changing the return type). I expect it can be applied by individual
maintainers, and we pick up the end once the dust is settled.
drivers/media/platform/qcom/venus/vdec.c | 10 ++++------
drivers/media/platform/qcom/venus/venc.c | 10 ++++------
2 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
index 6a43ea191da1..35c1b6ec1f9f 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -644,12 +644,12 @@ static int vdec_pm_put(struct venus_inst *inst, bool autosuspend)
{
struct venus_core *core = inst->core;
struct device *dev = core->dev_dec;
- int ret;
+ int ret = 0;
mutex_lock(&core->pm_lock);
if (autosuspend)
- ret = pm_runtime_put_autosuspend(dev);
+ pm_runtime_put_autosuspend(dev);
else
ret = pm_runtime_put_sync(dev);
@@ -671,7 +671,7 @@ static int vdec_pm_get_put(struct venus_inst *inst)
if (ret < 0)
goto error;
- ret = pm_runtime_put_autosuspend(dev);
+ pm_runtime_put_autosuspend(dev);
}
error:
@@ -1200,9 +1200,7 @@ static int vdec_start_streaming(struct vb2_queue *q, unsigned int count)
if (ret)
goto put_power;
- ret = vdec_pm_put(inst, true);
- if (ret)
- goto error;
+ vdec_pm_put(inst, true);
ret = vdec_start_output(inst);
}
diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index 79acf7c1ec9a..3c7c24dd7159 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -617,12 +617,12 @@ static int venc_pm_put(struct venus_inst *inst, bool autosuspend)
{
struct venus_core *core = inst->core;
struct device *dev = core->dev_enc;
- int ret;
+ int ret = 0;
mutex_lock(&core->pm_lock);
if (autosuspend)
- ret = pm_runtime_put_autosuspend(dev);
+ pm_runtime_put_autosuspend(dev);
else
ret = pm_runtime_put_sync(dev);
@@ -644,7 +644,7 @@ static int venc_pm_get_put(struct venus_inst *inst)
if (ret < 0)
goto error;
- ret = pm_runtime_put_autosuspend(dev);
+ pm_runtime_put_autosuspend(dev);
}
error:
@@ -1275,9 +1275,7 @@ static int venc_start_streaming(struct vb2_queue *q, unsigned int count)
if (ret)
goto put_power;
- ret = venc_pm_put(inst, true);
- if (ret)
- goto error;
+ venc_pm_put(inst, true);
ret = venc_set_properties(inst);
if (ret)
--
2.56.0.360.g66cac248cb-goog