From patchwork Fri Apr 22 10:02:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 8908541 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C2473BF29F for ; Fri, 22 Apr 2016 10:05:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0643E201B4 for ; Fri, 22 Apr 2016 10:05:41 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4141920160 for ; Fri, 22 Apr 2016 10:05:40 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1atXw8-0006Oj-Uo; Fri, 22 Apr 2016 10:03:44 +0000 Received: from mail-pf0-f195.google.com ([209.85.192.195]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1atXvz-0006Hu-UU; Fri, 22 Apr 2016 10:03:36 +0000 Received: by mail-pf0-f195.google.com with SMTP id 145so2182708pfz.1; Fri, 22 Apr 2016 03:03:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZpgNUYkdSGG3WXJmw66w1l2eY8HK0mdw+isvNg25Fl0=; b=RomDGmVdGYPJT9hzkk2RnC26yArZX2JcRAul6Be6antw/OXl2FQNacZMuPqQHmslZW 13TaX4XlHqH5I5srmEz19O5wYslItv9VxSZD29gsGaxf++4W1mnCY4nWddhN4VHFrd89 wk5c2Azjg5m4+ypXfKayvH7jCiJYZvvA5pV8/gIBaULQ6+9HhO4styxU1gN2pgno8PHS yBt2EkD754nFGrRbAD39yE9muO+XeY4eiM5xoA8BIeaFTTbf3u/Hn2J4z92+z78hznqF QDoOTQt89wUv/O2XdUjb3KF6fxAjVBweTUqVeqG5GWXQR1tvpTB4daEaQ0bnb+IqVamP xFuA== X-Gm-Message-State: AOPr4FW8DtqrRs27CedXrzQeb66wtX7Z8szvLJUpJJjEtwVDyu8RUW/oIrOx6Cb/9u+RXA== X-Received: by 10.98.79.203 with SMTP id f72mr27395112pfj.102.1461319395299; Fri, 22 Apr 2016 03:03:15 -0700 (PDT) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id 27sm7132490pfo.58.2016.04.22.03.03.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Apr 2016 03:03:14 -0700 (PDT) From: Caesar Wang To: edubezval@gmail.com, Heiko Stuebner Subject: [RESEND PATCH 1/8] thermal: rockchip: disable thermal->clk in err case Date: Fri, 22 Apr 2016 18:02:47 +0800 Message-Id: <1461319374-10024-2-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461319374-10024-1-git-send-email-wxt@rock-chips.com> References: <1461319374-10024-1-git-send-email-wxt@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160422_030336_034824_B62542D8 X-CRM114-Status: UNSURE ( 9.08 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.4 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pm@vger.kernel.org, Shawn Lin , dianders@chromium.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, smbarber@google.com, briannorris@google.com, Zhang Rui , linux-arm-kernel@lists.infradead.org, Caesar Wang MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Shawn Lin Disable thermal->clk when enabling pclk fails in resume routine. Signed-off-by: Shawn Lin Reviewed-by: Heiko Stuebner Reviewed-by: Caesar Wang Signed-off-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 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);