linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: bdisp: Fix PM disable depth imbalance in bdisp_probe
@ 2022-01-05 11:41 Miaoqian Lin
  0 siblings, 0 replies; only message in thread
From: Miaoqian Lin @ 2022-01-05 11:41 UTC (permalink / raw)
  Cc: linmq006, Fabien Dessenne, Mauro Carvalho Chehab, 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: 28ffeeb ("[media] bdisp: 2D blitter driver using v4l2 mem2mem framework")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
 drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
index 7d467f2ba072..ded4d026f84c 100644
--- a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
+++ b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
@@ -1396,6 +1396,8 @@ static int bdisp_probe(struct platform_device *pdev)
 err_remove:
 	bdisp_debugfs_remove(bdisp);
 	v4l2_device_unregister(&bdisp->v4l2_dev);
+disable_pm_runtime:
+	pm_runtime_disable(dev);
 err_clk:
 	if (!IS_ERR(bdisp->clock))
 		clk_unprepare(bdisp->clock);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-05 11:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-05 11:41 [PATCH] media: bdisp: Fix PM disable depth imbalance in bdisp_probe Miaoqian Lin

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