All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: rockchip/rga: Fix a reference count leak.
@ 2020-06-13 23:13 ` wu000273
  0 siblings, 0 replies; 5+ messages in thread
From: wu000273 @ 2020-06-13 23:13 UTC (permalink / raw)
  To: kjlu
  Cc: Heiko Stuebner, linux-kernel, Hans Verkuil, linux-rockchip,
	Jacob Chen, wu000273, Mauro Carvalho Chehab, Ezequiel Garcia,
	linux-arm-kernel, linux-media

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] 5+ messages in thread

end of thread, other threads:[~2020-06-18 12:32 UTC | newest]

Thread overview: 5+ 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-13 23:13 ` wu000273
2020-06-13 23:13 ` wu000273
2020-06-18 12:29 ` Heiko Stübner
2020-06-18 12:29   ` Heiko Stübner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.