linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: staging: tegra-vde: fix runtime pm imbalance on error
@ 2020-05-20  9:51 Dinghao Liu
  2020-05-20 10:15 ` Dmitry Osipenko
  2020-05-20 20:15 ` kbuild test robot
  0 siblings, 2 replies; 14+ messages in thread
From: Dinghao Liu @ 2020-05-20  9:51 UTC (permalink / raw)
  To: dinghao.liu, kjlu
  Cc: Dmitry Osipenko, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	Thierry Reding, Jonathan Hunter, linux-media, linux-tegra, devel,
	linux-kernel

pm_runtime_get_sync() increments the runtime PM usage counter even
it returns an error code. Thus a pairing decrement is needed on
the error handling path to keep the counter balanced.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
---
 drivers/staging/media/tegra-vde/vde.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/tegra-vde/vde.c b/drivers/staging/media/tegra-vde/vde.c
index d3e63512a765..dd134a3a15c7 100644
--- a/drivers/staging/media/tegra-vde/vde.c
+++ b/drivers/staging/media/tegra-vde/vde.c
@@ -777,7 +777,7 @@ static int tegra_vde_ioctl_decode_h264(struct tegra_vde *vde,
 
 	ret = pm_runtime_get_sync(dev);
 	if (ret < 0)
-		goto unlock;
+		goto put_runtime_pm;
 
 	/*
 	 * We rely on the VDE registers reset value, otherwise VDE
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-05-28 12:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-20  9:51 [PATCH] media: staging: tegra-vde: fix runtime pm imbalance on error Dinghao Liu
2020-05-20 10:15 ` Dmitry Osipenko
2020-05-20 15:02   ` Dan Carpenter
2020-05-21  3:42     ` dinghao.liu
2020-05-21  9:15       ` Dan Carpenter
2020-05-21 15:22         ` Rafael J. Wysocki
2020-05-21 17:39           ` Dan Carpenter
2020-05-22 13:10             ` Thierry Reding
2020-05-22 13:23               ` Dan Carpenter
2020-05-22 14:43                 ` Thierry Reding
2020-05-28 12:08                   ` Dan Carpenter
2020-05-28 12:31                     ` Rafael J. Wysocki
2020-05-21 17:02     ` Rafael J. Wysocki
2020-05-20 20:15 ` kbuild test robot

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).