]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: rkisp1: Discard pm_runtime_put() return value
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 22 Dec 2025 20:01:55 +0000 (21:01 +0100)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Wed, 21 Jan 2026 07:25:45 +0000 (08:25 +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 rkisp1_vb2_stop_streaming() 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: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patch.msgid.link/2356323.iZASKD2KPV@rafael.j.wysocki
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c

index 6dcefd144d5abe358323e37ac6133c6134ac636e..867cdddf9f891d6d84da3dacb15e1764937c0ad7 100644 (file)
@@ -1123,7 +1123,6 @@ static void rkisp1_vb2_stop_streaming(struct vb2_queue *queue)
        struct rkisp1_capture *cap = queue->drv_priv;
        struct rkisp1_vdev_node *node = &cap->vnode;
        struct rkisp1_device *rkisp1 = cap->rkisp1;
-       int ret;
 
        mutex_lock(&cap->rkisp1->stream_lock);
 
@@ -1132,9 +1131,7 @@ static void rkisp1_vb2_stop_streaming(struct vb2_queue *queue)
        rkisp1_return_all_buffers(cap, VB2_BUF_STATE_ERROR);
 
        v4l2_pipeline_pm_put(&node->vdev.entity);
-       ret = pm_runtime_put(rkisp1->dev);
-       if (ret < 0)
-               dev_err(rkisp1->dev, "power down failed error:%d\n", ret);
+       pm_runtime_put(rkisp1->dev);
 
        rkisp1_dummy_buf_destroy(cap);