[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220105113104.7783-1-linmq006@gmail.com>
Date: Wed, 5 Jan 2022 11:31:03 +0000
From: Miaoqian Lin <linmq006@...il.com>
To: unlisted-recipients:; (no To-header on input)
Cc: linmq006@...il.com,
Jean-Christophe Trotin <jean-christophe.trotin@...s.st.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Peter Griffin <peter.griffin@...aro.org>,
Yannick Fertre <yannick.fertre@...com>,
Hans Verkuil <hans.verkuil@...co.com>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] media: st-hva: Fix PM disable depth imbalance in hva_hw_probe
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@...il.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
Powered by blists - more mailing lists