[PATCH] media: st-hva: Fix PM disable depth imbalance in hva_hw_probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux