Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755302AbcCCDer (ORCPT ); Wed, 2 Mar 2016 22:34:47 -0500 Received: from mail-pf0-f179.google.com ([209.85.192.179]:33717 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752672AbcCCDeq (ORCPT ); Wed, 2 Mar 2016 22:34:46 -0500 Subject: Re: [PATCH] thermal: rockchip: disable thermal->clk in err case To: Shawn Lin References: <1455503242-19907-1-git-send-email-shawn.lin@rock-chips.com> Cc: Zhang Rui , Eduardo Valentin , Heiko Stuebner , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Caesar Wang From: Caesar Wang Message-ID: <56D7B0D0.7090605@gmail.com> Date: Thu, 3 Mar 2016 11:34:40 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <1455503242-19907-1-git-send-email-shawn.lin@rock-chips.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 902 Lines: 38 Hi , Sorry for the missing it. 在 2016年02月15日 10:27, Shawn Lin 写道: > Disable thermal->clk when enabling pclk fails in > resume routine. > > Signed-off-by: Shawn Lin Reviewed-by: Caesar Wang > --- > > 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 9787e8a..b54f6db 100644 > --- a/drivers/thermal/rockchip_thermal.c > +++ b/drivers/thermal/rockchip_thermal.c > @@ -656,8 +656,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); > -- Thanks, Caesar