Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: rkisp1: Discard pm_runtime_put() return value

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>

authored by

Rafael J. Wysocki and committed by
Hans Verkuil
bb0365f4 23e1bfef

+1 -4
+1 -4
drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
··· 1123 1123 struct rkisp1_capture *cap = queue->drv_priv; 1124 1124 struct rkisp1_vdev_node *node = &cap->vnode; 1125 1125 struct rkisp1_device *rkisp1 = cap->rkisp1; 1126 - int ret; 1127 1126 1128 1127 mutex_lock(&cap->rkisp1->stream_lock); 1129 1128 ··· 1131 1132 rkisp1_return_all_buffers(cap, VB2_BUF_STATE_ERROR); 1132 1133 1133 1134 v4l2_pipeline_pm_put(&node->vdev.entity); 1134 - ret = pm_runtime_put(rkisp1->dev); 1135 - if (ret < 0) 1136 - dev_err(rkisp1->dev, "power down failed error:%d\n", ret); 1135 + pm_runtime_put(rkisp1->dev); 1137 1136 1138 1137 rkisp1_dummy_buf_destroy(cap); 1139 1138