All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miaoqian Lin <linmq006@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: linmq006@gmail.com,
	Jean-Christophe Trotin <jean-christophe.trotin@foss.st.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Peter Griffin <peter.griffin@linaro.org>,
	Yannick Fertre <yannick.fertre@st.com>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] media: st-hva: Fix PM disable depth imbalance in hva_hw_probe
Date: Wed,  5 Jan 2022 11:31:03 +0000	[thread overview]
Message-ID: <20220105113104.7783-1-linmq006@gmail.com> (raw)

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


             reply	other threads:[~2022-01-05 11:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05 11:31 Miaoqian Lin [this message]
2022-01-05 23:59 ` [PATCH] media: st-hva: Fix PM disable depth imbalance in hva_hw_probe kernel test robot
2022-01-05 23:59   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220105113104.7783-1-linmq006@gmail.com \
    --to=linmq006@gmail.com \
    --cc=hans.verkuil@cisco.com \
    --cc=jean-christophe.trotin@foss.st.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=peter.griffin@linaro.org \
    --cc=yannick.fertre@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.