* [PATCH] media: rockchip/rga: Fix a reference count leak.
@ 2020-06-13 23:13 wu000273
2020-06-18 12:29 ` Heiko Stübner
0 siblings, 1 reply; 2+ messages in thread
From: wu000273 @ 2020-06-13 23:13 UTC (permalink / raw)
To: kjlu
Cc: wu000273, Jacob Chen, Ezequiel Garcia, Mauro Carvalho Chehab,
Heiko Stuebner, Hans Verkuil, linux-media, linux-rockchip,
linux-arm-kernel, linux-kernel
From: Qiushi Wu <wu000273@umn.edu>
pm_runtime_get_sync() increments the runtime PM usage counter even
when it returns an error code. Thus call pm_runtime_put_noidle()
if pm_runtime_get_sync() fails.
Fixes: f7e7b48e6d79 ("[media] rockchip/rga: v4l2 m2m support")
Signed-off-by: Qiushi Wu <wu000273@umn.edu>
---
drivers/media/platform/rockchip/rga/rga-buf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/platform/rockchip/rga/rga-buf.c b/drivers/media/platform/rockchip/rga/rga-buf.c
index 36b821ccc1db..bf9a75b75083 100644
--- a/drivers/media/platform/rockchip/rga/rga-buf.c
+++ b/drivers/media/platform/rockchip/rga/rga-buf.c
@@ -81,6 +81,7 @@ static int rga_buf_start_streaming(struct vb2_queue *q, unsigned int count)
ret = pm_runtime_get_sync(rga->dev);
if (ret < 0) {
+ pm_runtime_put_noidle(rga->dev);
rga_buf_return_buffers(q, VB2_BUF_STATE_QUEUED);
return ret;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: rockchip/rga: Fix a reference count leak.
2020-06-13 23:13 [PATCH] media: rockchip/rga: Fix a reference count leak wu000273
@ 2020-06-18 12:29 ` Heiko Stübner
0 siblings, 0 replies; 2+ messages in thread
From: Heiko Stübner @ 2020-06-18 12:29 UTC (permalink / raw)
To: wu000273
Cc: kjlu, Jacob Chen, Ezequiel Garcia, Mauro Carvalho Chehab,
Hans Verkuil, linux-media, linux-rockchip, linux-arm-kernel,
linux-kernel
Am Sonntag, 14. Juni 2020, 01:13:49 CEST schrieb wu000273@umn.edu:
> From: Qiushi Wu <wu000273@umn.edu>
>
> pm_runtime_get_sync() increments the runtime PM usage counter even
> when it returns an error code. Thus call pm_runtime_put_noidle()
> if pm_runtime_get_sync() fails.
>
> Fixes: f7e7b48e6d79 ("[media] rockchip/rga: v4l2 m2m support")
> Signed-off-by: Qiushi Wu <wu000273@umn.edu>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
> ---
> drivers/media/platform/rockchip/rga/rga-buf.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/media/platform/rockchip/rga/rga-buf.c b/drivers/media/platform/rockchip/rga/rga-buf.c
> index 36b821ccc1db..bf9a75b75083 100644
> --- a/drivers/media/platform/rockchip/rga/rga-buf.c
> +++ b/drivers/media/platform/rockchip/rga/rga-buf.c
> @@ -81,6 +81,7 @@ static int rga_buf_start_streaming(struct vb2_queue *q, unsigned int count)
>
> ret = pm_runtime_get_sync(rga->dev);
> if (ret < 0) {
> + pm_runtime_put_noidle(rga->dev);
> rga_buf_return_buffers(q, VB2_BUF_STATE_QUEUED);
> return ret;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-18 12:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-13 23:13 [PATCH] media: rockchip/rga: Fix a reference count leak wu000273
2020-06-18 12:29 ` Heiko Stübner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).