All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: st-hva: Fix PM disable depth imbalance in hva_hw_probe
@ 2022-01-05 11:31 Miaoqian Lin
  2022-01-05 23:59   ` kernel test robot
  0 siblings, 1 reply; 3+ messages in thread
From: Miaoqian Lin @ 2022-01-05 11:31 UTC (permalink / raw)
  Cc: linmq006, Jean-Christophe Trotin, Mauro Carvalho Chehab,
	Peter Griffin, Yannick Fertre, Hans Verkuil, linux-media,
	linux-kernel

The pm_runtime_enable will increase power disable depth.
If the probe fails, we should use pm_runtime_disable() to balance
pm_runtime_enable().

Fixes: 57b2c06 ("[media] st-hva: multi-format video encoder V4L2 driver")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
 drivers/media/platform/sti/hva/hva-hw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/sti/hva/hva-hw.c b/drivers/media/platform/sti/hva/hva-hw.c
index 15e8f83b1b56..bef880951921 100644
--- a/drivers/media/platform/sti/hva/hva-hw.c
+++ b/drivers/media/platform/sti/hva/hva-hw.c
@@ -406,7 +406,8 @@ int hva_hw_probe(struct platform_device *pdev, struct hva_dev *hva)
 err_clk:
 	if (hva->clk)
 		clk_unprepare(hva->clk);
-
+disable_pm_runtime:
+	pm_runtime_disable(dev);
 	return ret;
 }
 
-- 
2.17.1


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

end of thread, other threads:[~2022-01-06  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-05 11:31 [PATCH] media: st-hva: Fix PM disable depth imbalance in hva_hw_probe Miaoqian Lin
2022-01-05 23:59 ` kernel test robot
2022-01-05 23:59   ` kernel test robot

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.