public inbox for linux-rockchip@lists.infradead.org
 help / color / mirror / Atom feed
From: Caesar Wang <wxt@rock-chips.com>
To: edubezval@gmail.com, Heiko Stuebner <heiko@sntech.de>
Cc: dianders@chromium.org, briannorris@google.com,
	smbarber@google.com, linux-rockchip@lists.infradead.org,
	Shawn Lin <shawn.lin@rock-chips.com>,
	Caesar Wang <wxt@rock-chips.com>, Zhang Rui <rui.zhang@intel.com>,
	linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [RESEND PATCH 1/8] thermal: rockchip: disable thermal->clk in err case
Date: Fri, 22 Apr 2016 18:02:47 +0800	[thread overview]
Message-ID: <1461319374-10024-2-git-send-email-wxt@rock-chips.com> (raw)
In-Reply-To: <1461319374-10024-1-git-send-email-wxt@rock-chips.com>

From: Shawn Lin <shawn.lin@rock-chips.com>

Disable thermal->clk when enabling pclk fails in
resume routine.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
---

 drivers/thermal/rockchip_thermal.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
index 1dbd862..f4c4bcd 100644
--- a/drivers/thermal/rockchip_thermal.c
+++ b/drivers/thermal/rockchip_thermal.c
@@ -979,8 +979,10 @@ static int __maybe_unused rockchip_thermal_resume(struct device *dev)
 		return error;
 
 	error = clk_enable(thermal->pclk);
-	if (error)
+	if (error) {
+		clk_disable(thermal->clk);
 		return error;
+	}
 
 	rockchip_thermal_reset_controller(thermal->reset);
 
-- 
1.9.1

  reply	other threads:[~2016-04-22 10:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-22 10:02 [RESEND PATCH 0/8] thermal: rockchip: Support rk3366/rk3399 SoCS and fixes the driver Caesar Wang
2016-04-22 10:02 ` Caesar Wang [this message]
2016-04-22 10:02 ` [RESEND PATCH 2/8] thermal: rockchip: fixes the code_to_temp for tsadc driver Caesar Wang
2016-04-22 10:02 ` [RESEND PATCH 3/8] thermal: rockchip: update the tsadc table for rk3399 Caesar Wang
2016-04-22 10:02 ` [RESEND PATCH 4/8] thermal: rockchip: handle the power sequence for tsadc controller Caesar Wang
2016-04-22 10:02 ` [RESEND PATCH 5/8] thermal: rockchip: Support RK3366 SoCs in the thermal driver Caesar Wang
2016-04-22 10:02 ` [RESEND PATCH 6/8] thermal: rockchip: add the notes for better reading Caesar Wang
2016-04-22 10:02 ` [RESEND PATCH 7/8] ARM: dts: rockchip: move the rk3288 thermal data into rk3288.dtsi Caesar Wang
2016-04-25  7:57   ` Heiko Stübner
2016-04-22 10:02 ` [RESEND PATCH 8/8] arm64: dts: rockchip: move the rk3368 thermal data into rk3368.dtsi Caesar Wang
2016-04-25  7:57   ` Heiko Stübner

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=1461319374-10024-2-git-send-email-wxt@rock-chips.com \
    --to=wxt@rock-chips.com \
    --cc=briannorris@google.com \
    --cc=dianders@chromium.org \
    --cc=edubezval@gmail.com \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=rui.zhang@intel.com \
    --cc=shawn.lin@rock-chips.com \
    --cc=smbarber@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox