]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: mediatek: vcodec: Discard pm_runtime_put() return value
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 8 Jan 2026 15:23:21 +0000 (16:23 +0100)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 13 Jan 2026 08:41:59 +0000 (09:41 +0100)
Printing error messages on pm_runtime_put() returning negative values
is not particularly useful.

Returning an error code from pm_runtime_put() merely means that it has
not queued up a 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 devices' runtime PM "control"
attribute in sysfs for one example.

Accordingly, update mtk_vcodec_enc_pw_off() and mtk_vcodec_dec_pw_off()
to simply discard the return value of pm_runtime_put().

This will facilitate a planned change of the pm_runtime_put() return
type to void in the future.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_pm.c
drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.c

index aefd3e9e30617e459c3010f76c49f53b9215a8cb..f6f03c61c643f99381c827bca5dd5f859dd8559b 100644 (file)
@@ -67,11 +67,7 @@ static int mtk_vcodec_dec_pw_on(struct mtk_vcodec_pm *pm)
 
 static void mtk_vcodec_dec_pw_off(struct mtk_vcodec_pm *pm)
 {
-       int ret;
-
-       ret = pm_runtime_put(pm->dev);
-       if (ret && ret != -EAGAIN)
-               dev_err(pm->dev, "pm_runtime_put fail %d", ret);
+       pm_runtime_put(pm->dev);
 }
 
 static void mtk_vcodec_dec_clock_on(struct mtk_vcodec_pm *pm)
index 1a2b14a3e219c2b3c9f90832caf0d85bf932417a..edf9133c06730b728bb37610558f98c198a9a8a3 100644 (file)
@@ -71,11 +71,7 @@ int mtk_vcodec_enc_pw_on(struct mtk_vcodec_pm *pm)
 
 void mtk_vcodec_enc_pw_off(struct mtk_vcodec_pm *pm)
 {
-       int ret;
-
-       ret = pm_runtime_put(pm->dev);
-       if (ret && ret != -EAGAIN)
-               dev_err(pm->dev, "pm_runtime_put fail %d", ret);
+       pm_runtime_put(pm->dev);
 }
 
 void mtk_vcodec_enc_clock_on(struct mtk_vcodec_pm *pm)